Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
DragGan
/
DragGan-Inversion
like
55
Runtime error
App
Files
Files
Community
5
d5fbc14
DragGan-Inversion
/
PTI
/
criteria
/
l2_loss.py
radames
first
bb0f5a9
over 1 year ago
raw
Copy download link
history
blame
No virus
181 Bytes
import
torch
l2_criterion = torch.nn.MSELoss(reduction=
'mean'
)
def
l2_loss
(
real_images, generated_images
):
loss = l2_criterion(real_images, generated_images)
return
loss