You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using torch==1.11.0+cu113 and the example for Poly1 Cross-Entropy Loss throws an error RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn.
I just have to change line 7 to logits = torch.rand([batch_size, num_classes], requires_grad=True) for it to work.
The text was updated successfully, but these errors were encountered:
I'm using torch==1.11.0+cu113 and the example for Poly1 Cross-Entropy Loss throws an error
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
.I just have to change line 7 to
logits = torch.rand([batch_size, num_classes], requires_grad=True)
for it to work.The text was updated successfully, but these errors were encountered: