cuDNN下載安裝教學
https://brian-liu.medium.com/build-enviroment-cuda-cudnn-on-win11-6ac5e51268f3 接續前一篇 關於GPU顯卡TFLOPS指標介紹和CUDA Toolkit下載安裝教學 裝完CUDA Toolkit之外還需要下載安裝cuDNN https://developer.nvidia.com/rdp/cudnn-archive 由於我這邊裝的版本是CUDA Toolkit 11.2.2 因此從最新版本cuDNN v8.9.7、cuDNN v8.9.5、.....只要有匹配的CUDA 11.x都可以下載安裝 不然預設你的本地電腦Tensorflow程式,是無法啟用到GPU資源的。 Python測試腳本 import tensorflow as tf print ( "TensorFlow:" , tf . __version__ ) gpus = tf . config . list_physical_devices ( "GPU" ) print ( "Detected GPU:" , gpus ) print('GPU->',tf.test.is_gpu_available()) if gpus : try : for gpu in gpus : tf . config . experimental . set_memory_growth ( gpu , True ) with tf . device ( "/GPU:0" ): a = tf . random . normal (( 512 , 512 )) b = tf . matmul ( a , a ) print ( "GPU calculation:" , b . device ) print ( "GPU test: PASS" ) except Exception as ...