From f6b3790537e8e5da225cd3c018bf407e8e4519b4 Mon Sep 17 00:00:00 2001
From: XPixeler <104772691+XPixeler@users.noreply.github.com>
Date: Sun, 6 Nov 2022 15:24:04 +0800
Subject: [PATCH 1/2] Update README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index e04471ca8..669f5620f 100644
--- a/README.md
+++ b/README.md
@@ -119,3 +119,5 @@ If you have any questions, please email `xintao.alpha@gmail.com`, `xintao.wang@o
+
+![visitors](https://visitor-badge.glitch.me/badge?page_id=XPixelGroup/BasicSR) (start from 2022-11-06)
From 55212830ca2d6483ccbf4656aa86069da8d9123c Mon Sep 17 00:00:00 2001
From: Liangbin
Date: Thu, 2 Feb 2023 14:15:23 +0800
Subject: [PATCH 2/2] fix a bug: change l2 to mse (#570)
* add calc_psnr script
* delete calc_psnr script
* change l2 to mse
---------
Co-authored-by: Xintao
---
basicsr/losses/basic_loss.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/basicsr/losses/basic_loss.py b/basicsr/losses/basic_loss.py
index d2e965526..c95b2b77c 100644
--- a/basicsr/losses/basic_loss.py
+++ b/basicsr/losses/basic_loss.py
@@ -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: