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
Hi,Thank you for your contribution to this work.
When I run train.py, encountered a ValueError: only one element tensors can be converted to Python scalars in line 303, in compute_ loss
label = torch. tensor(labels, dtype=torch.long)
I have tried to convert it into label = torch.stack (labels) or convert list into array and then into tensor, but none of them works.
How can I solve this problem?
The text was updated successfully, but these errors were encountered:
Hi,Thank you for your contribution to this work.
When I run train.py, encountered a ValueError: only one element tensors can be converted to Python scalars in line 303, in compute_ loss
label = torch. tensor(labels, dtype=torch.long)
I have tried to convert it into label = torch.stack (labels) or convert list into array and then into tensor, but none of them works.
How can I solve this problem?
The text was updated successfully, but these errors were encountered: