Skip to content

Commit

Permalink
fix a bug: change l2 to mse (#570)
Browse files Browse the repository at this point in the history
* add calc_psnr script

* delete calc_psnr script

* change l2 to mse

---------

Co-authored-by: Xintao <[email protected]>
  • Loading branch information
LiangbinXie and xinntao authored Feb 2, 2023
1 parent f6b3790 commit 5521283
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion basicsr/losses/basic_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def __init__(self,
if self.criterion_type == 'l1':
self.criterion = torch.nn.L1Loss()
elif self.criterion_type == 'l2':
self.criterion = torch.nn.L2loss()
self.criterion = torch.nn.MSELoss()
elif self.criterion_type == 'fro':
self.criterion = None
else:
Expand Down

0 comments on commit 5521283

Please sign in to comment.