-
Notifications
You must be signed in to change notification settings - Fork 307
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
关于loss疑问 #48
Comments
yangjian1218, 您好, 关于疑问1. 只是因为有时模型定义的参数并没有真正参与到计算(所以会没有梯度),训练时可能会报错。 关于疑问2. loss 为负数并不会影响梯度 / 参数的更新。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
疑问1: 在代码image_restoration_model.py 225行l_total = l_total + 0. * sum(p.sum() for p in self.net_g.parameters()) . 0乘以任何数都=0,这是啥操作?
疑问2: 关于PSNRLoss:self.scale * torch.log(((pred - target) ** 2).mean(dim=(1, 2, 3)) + 1e-8).mean(). 即 10/ln(10) * ln(MSE) 这里MaxValue是=1的吧?. PSNR公司 MSE是在分母位置, 这里为什么在分子位置. 如果在分子位置,那么这个损失是负值啊. 怎么梯度更新呢?
The text was updated successfully, but these errors were encountered: