Skip to content

Commit 5521283

Browse files
LiangbinXiexinntao
andauthored
fix a bug: change l2 to mse (#570)
* add calc_psnr script * delete calc_psnr script * change l2 to mse --------- Co-authored-by: Xintao <[email protected]>
1 parent f6b3790 commit 5521283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

basicsr/losses/basic_loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def __init__(self,
189189
if self.criterion_type == 'l1':
190190
self.criterion = torch.nn.L1Loss()
191191
elif self.criterion_type == 'l2':
192-
self.criterion = torch.nn.L2loss()
192+
self.criterion = torch.nn.MSELoss()
193193
elif self.criterion_type == 'fro':
194194
self.criterion = None
195195
else:

0 commit comments

Comments
 (0)