Bool value of Tensor with more than one value is ambiguous

In my case, change nn.MSELoss(y_true, y_pred) to nn.MSELoss()(y_true, y_pred) works. Check whether there is a typo.

26 Likes