Tensorflow-GPU installation process in the window environment

    Tensorflow is the second-generation machine learning system announced by Google as open source on November 9, 2015. It supports python and C++, and supports algorithms such as CNN, RNN, and LSTM. Here, the python IDE recommends pyChorm, which is powerful and easy to install libraries. The default cpu version of tensorflow can be installed and run directly with pip without any problem, but the speed is very slow, so using tensorflow-gpu instead, the speed can be improved a lot.

     First check whether the computer supports gpu. After confirming the support, first download NVIDIA's CUDA and CUDNN (which can be downloaded from NVIDIA's official website), CUDA is image processing support, and CUDNN is a necessary plug-in to link tensorflow and CUDA. Here CUDA must download version 8.0, 9.0 The version is not currently supported. The correspondence of versions here is very strict. I downloaded the pyltp of Harbin Institute of Technology before, and I realized that a version of pyltp requires a version of visio studio. I tried many versions, and finally chose Tensorflow-gpu 1.14.0rc1 + cuda_8.0.61.2_windows + cudnn-8.0-windows10-x64-v6.0 First download cuda, and after the default path is installed, there are the following files even if the installation is successful.

      Then download cudnn, there are three folders after decompression.

      Copy the files in each folder of cudnn to the same folder corresponding to CUDA.

      Finally, modify the environment variable. After installing CUDN, the default environment variable is CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0. The bin directory and x64 directory are not displayed, and they are added to the path separately. Finally also confirm that there is visio studio c++ 2015 Redistributable - x64 environment. If not, an error 'DLL not found' will be reported.

     Then open the command line and enter pip install tensorflow-gpu, wait for the gpu version of tensorflow to be installed and it will be OK, enter python to enter the python environment, enter import tensorflow as tf, if no error is reported, the installation is successful, if an error is reported, restart once.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326484399&siteId=291194637