Finding the cause of failure of Tensorflow calling GPU

Problem finding

Open the image, enter python, import tensorflow, and check the prompt information. A
Insert image description here
warning appears here.cudart64_101.dll not found

Solution

Find the cuda directory you installed, enter the bin file and find the cudart64_*.dll file. Maybe your file is cudart64_102.dll, but you only need to change this file to the file name that is not found as shown above.
Insert image description here

Finish

View available devices

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

Insert image description here
At this time we can see our own GPU information, indicating that it has been successful.

Guess you like

Origin blog.csdn.net/qq_43802454/article/details/121653611