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.
JavaScript
x
5
1
Traceback (most recent call last):
2
File "D:Electrical And Programming office6_AIRL5_Pong_DQNpong_DGN.py", line 38, in <module>
3
gpu = tf.config.experimental.list_physical_devices('GPU')[0]
4
IndexError: list index out of range
5
JavaScript
1
3
1
>>> print(tf.test.is_built_with_cuda())
2
True
3
Advertisement
Answer
I found the problem. the problem was versions of CUDA and cudnn.