Skip to content

训练时计算psnr错误 #16

Description

@bokeyyy

在训练时计算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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions