Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
Duplicated from
ucalyptus/PTI
trysem
/
PTI
like
0
Sleeping
App
Files
Files
Community
main
PTI
/
criteria
/
l2_loss.py
trysem
Duplicate from ucalyptus/PTI
4d9fdb5
about 1 year ago
raw
history
blame
contribute
delete
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