tensorflow GPU test tf.test.is_gpu_avaiable () returns false solutions

When you configure CUDA, cuDNN, tensorflow, and ensure version between these three after the corresponding agreement, hopeful that you enter in a terminal:

In[1] import tensorflow as tf
In[2] tf.test.is_gpu_available()

The results life gives you a blow:

Out[2]: False

This time, do not panic, first think I said above, CUDA, and tensorflow version cuDNN There are no consistent correspondence, correspondence between the versions do not know, you can enter this portal: the latest official version of the corresponding information https: // blog. csdn.net/flana/article/details/104768188 view the latest news as of the official 2020 March 10 of. ( If it does not, then the corresponding effect can also be achieved by modifying the file names inside lib but this by modifying means to an end is unstable, the best solution is to release the three tools of the corresponding agreement )
if determining a corresponding agreement, but also the environment variable to confirm the configuration is correct, or returned to False, then follow what steps:
1. right-click on the desktop, open the Nvidia control panel, without Nvidia control panel, proceed to step 2; if so, execution step 3.
2. Download Nvidia Experience, the default option to install (probably occupy the C drive 4G capacity). After the installation is completed, Step 1.
3. Open System Information.
4, see the CUDA driver version, if the version is too low, the Nvidia Experience update the driver. The default installation.
5, after installation, the way the setting is fixed PhysX graphics card.
View CUDA driver
CUDA driver update
The fixed graphics card with PhysX
Here again we enter in a terminal:

In[3] import tensorflow as tf
In[4] tf.test.is_gpu_available()

After waiting for about 10 minutes (the time is determined by the computing power of the graphics card)
you will feel the breath of the sweet science from:

Out[4] True

```
Here we can continue to use tensorflow-gpu happy friends

Released two original articles · won praise 0 · Views 115

Guess you like

Origin blog.csdn.net/flana/article/details/104772614