Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练时计算psnr错误 #16

Open
Boboshinidie opened this issue Mar 20, 2025 · 0 comments
Open

训练时计算psnr错误 #16

Boboshinidie opened this issue Mar 20, 2025 · 0 comments

Comments

@Boboshinidie
Copy link

在训练时计算psnr时mse值出现异常
Epoch: [054]Loss [sr loss: 7.398] Time [167.8s]
Traceback (most recent call last):
File "/home/QLB/experiment/train.py", line 65, in
trainer.train()
File "/home/QLB/experiment/trainer.py", line 257, in train
self.train_stage1()
File "/home/QLB/experiment/trainer.py", line 289, in train_stage1
val_psnr, val_ssim = self._validate(epoch, 1)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/QLB/experiment/trainer.py", line 424, in _validate
psnr = util.calc_psnr(
^^^^^^^^^^^^^^^
File "/home/QLB/experiment/util.py", line 192, in calc_psnr
return -10 * math.log10(mse)
^^^^^^^^^^^^^^^
ValueError: math domain error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant