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
@quark0 Sir,
IndexError: invalid index of a 0-dim tensor. Use tensor.item() in Python or tensor.item<T>() in C++ to convert a 0-dim tensor to a number
I am getting the above error when i try to run the following command " cd cnn && python test.py --auxiliary --model_path cifar10_model.pt" for cifar 10
Thank you in Advance.
The text was updated successfully, but these errors were encountered:
The index error occurs in PyTorch >= 0.5. You could replace loss.data[0] by loss.data and all other related areas, or downgrade the PyTorch version. For more information about this error, you could refer to this link.
@quark0 Sir,
IndexError: invalid index of a 0-dim tensor. Use
tensor.item()
in Python ortensor.item<T>()
in C++ to convert a 0-dim tensor to a numberI am getting the above error when i try to run the following command " cd cnn && python test.py --auxiliary --model_path cifar10_model.pt" for cifar 10
Thank you in Advance.
The text was updated successfully, but these errors were encountered: