Now I am getting this error:
UserWarning: Using a target size (torch.Size([5, 1, 6, 6])) that is different to the input size (torch.Size([3, 1, 6, 6])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.mse_loss(input, target, reduction=self.reduction)
RuntimeError: The size of tensor a (3) must match the size of tensor b (5) at non-singleton dimension 0