Skip to content
Advertisement

tensorflow cannot find GPU

I had install “tensorflow-GPU”, CUDA 10.0. and my GPU is GTX1660 ti. I also tested bu CUDA 10.2 and 11. I added cudnn to windows PATH but I still got this error.

Traceback (most recent call last):
  File "D:Electrical And Programming office6_AIRL5_Pong_DQNpong_DGN.py", line 38, in <module>
    gpu = tf.config.experimental.list_physical_devices('GPU')[0]
IndexError: list index out of range
>>> print(tf.test.is_built_with_cuda())
True

Advertisement

Answer

I found the problem. the problem was versions of CUDA and cudnn.

enter image description here

Advertisement