I have a GPU and CUDA installed in Windows 10 but Pytorch's torch.cuda.is_available() returns false; how can I correct this?
I have PyTorch installed on a Windows 10 machine with a Nvidia GTX 1050 GPU. I have installed the CUDA Toolkit and tested it using Nvidia instructions and that has gone smoothly, including execution of the suggested tests.

However, torch.cuda.is_available() returns False. How can I fix this?

I also had the same issue.
And running this =&gt; 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 command dialog and run it on your terminal.



