I also had the same issue.
And running this => a=torch.cuda.FloatTensor(), gave the assertion error AssertionError: Torch not compiled with CUDA enabled . …which kind of cleared that i was running pytorch without cuda.
Steps:
-
Make sure you have un-installed Pytorch by invoking the following command:
pip uninstall torch -
Go to https://pytorch.org/get-started/locally/ and select your system configurations(as shown in the figure).
-
Copy the exact command from the
Run this commanddialog and run it on your terminal.
