For install cudatoolkit and cudnn by Anaconda you can use these following command conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
on command prompt
You must aware the tensorflow version must be less than 2.11 for above command
Please check the following website and choose the appropriate versions for TensorFlow, TensorFlow-GPU, CUDA, and cuDNN:
https://www.tensorflow.org/install/source_windows#gpu
https://www.tensorflow.org/install/source_windows#cpu
For check if the everything installed properly
-
In command prompt check
nvidia-smi
command. if shows command not found you must install the latest GPU driver -
Use this python script which give given as GPU_test.py to detect gpu by python