MSELoss(size_average=False)
nn.MSELoss()得到的是平均到像素的loss
nn.MSELoss(size_average=False)得到整个batch所有像素loss和
MSELoss(size_average=False).div(batch_size)得到平均图像loss
a=torch.Tensor([[1,1],[1,1]])
b=torch.Tensor([[0,0],[0,0]])
f = nn.MSELoss()
f(a,b)
>>>tensor(1.)
f = nn.MSELoss(size_average=False)
f(a,b)
>>>tensor(4.)