Closed araffin closed 6 years ago
In reconstructionLoss() (losses/losses.py) this does yield the same output with pytorch 0.4.1 (pytorch 0.4 not affected):
losses/losses.py
F.mse_loss(input_image, target_image, reduction='elementwise_mean') F.mse_loss(input_image, target_image, reduction='sum')
To reproduce the bug:
import torch as th import torch.nn.functional as F a = th.ones(10, 10) a.requires_grad_(True) b = a.clone() * 2 print(F.mse_loss(a, b, reduction='elementwise_mean')) print(F.mse_loss(a, b, reduction='sum'))
Submitting issue to pytorch main repo
Fixed on pytorch master branch: https://github.com/pytorch/pytorch/issues/10009 TODO: update code when new release is out
In reconstructionLoss() (
losses/losses.py
) this does yield the same output with pytorch 0.4.1 (pytorch 0.4 not affected):To reproduce the bug: