Cuda not Avaliable

I installed Cuda toolkit and cudnn but still, it’s showing Cuda not available.
import torch
import numpy as np

check if CUDA is available

train_on_gpu = torch.cuda.is_available()

if not train_on_gpu:
print(‘CUDA is not available. Training on CPU …’)
print(‘CUDA is available! Training on GPU …’)

CUDA is not available. Training on CPU …

Please. I need a solution.

What is the result of python -m torch.utils.collect_env?

PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: Could not collect

OS: Microsoft Windows 10 Home Single Language
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.7
Is CUDA available: No
CUDA runtime version: 10.2.89
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy==1.18.1
[pip] numpydoc==0.9.2
[pip] torch==1.4.0
[pip] torchvision==0.5.0
[conda] blas 1.0 mkl
[conda] cpuonly 1.0 0 pytorch
[conda] mkl 2020.0 166
[conda] mkl-service 2.3.0 py37hb782905_0
[conda] mkl_fft 1.0.15 py37h14836fe_0
[conda] mkl_random 1.1.0 py37h675688f_0
[conda] pytorch 1.4.0 py3.7_cpu_0 [cpuonly] pytorch
[conda] torchvision 0.5.0 py37_cpu [cpuonly] pytorch

Have you installed the driver of your GPU? I didn’t see which version is installed in the log.

Gpu driver version 10.2

Fri Mar 20 12:55:56 2020
| NVIDIA-SMI 441.45 Driver Version: 441.45 CUDA Version: 10.2 |
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| 0 GeForce GTX 1650 WDDM | 00000000:01:00.0 Off | N/A |
| N/A 37C P8 5W / N/A | 134MiB / 4096MiB | 0% Default |

| Processes: GPU Memory |
| GPU PID Type Process name Usage |
| No running processes found |

I just saw that you are using a cpuonly version of PyTorch. Please remove the cpuonly package and reinstall the cuda version of PyTorch according to the steps on