Got RuntimeError: Boolean value of Tensor with more than one value is ambiguous during training

Answered in your cross-post.