I have 2 tensors with .size
of torch.Size([2272, 161])
. I want to get mean-squared-error between them. However, I want it along each of the 161 channels, so that my error tensor has a .size
of torch.Size([161])
. How can I accomplish this?
It seems that torch.nn.MSELoss
doesn't let me specify a dimension.