Windows install tensorflow-gpu development environment

   

 

    The new version of tensorflow already supports windows, but the pythony version cannot use 2.x, but 3.x. It seems that the latest tensorflow supports two python versions, 3.5 and 3.6, and other 3.x python versions have not been tested. Of course, the computer must have an nvidia graphics card. My computer is relatively poor, with a gtx 950, and the example is still much faster than the cpu. The following are the specific installation steps:

   

   1. Install the latest version of tensorflow-gpu

pip install tf-nightly-gpu

    Note: This may be slow, it is best to configure the domestic pip source, I use the pip source of Tsinghua University, the specific configuration reference:

https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

   

   2. Install cuda+cudnn

   Special attention should be paid here, the versions of cudnn and cuda should correspond to each other, and cannot be installed indiscriminately. I installed cuda9.0+cudnn 7 for duda 9.0 here

   There is also the current version of tensorflow: tf-nightly-gpu (1.6.0.dev20180126) does not support cuda 9.1, I just installed 9.1 only to find that it only supports cuda9.0, and then uninstalled and reinstalled cuda 9.0.

   2.1 cuda installation

https://developer.nvidia.com/cuda-90-download-archive

   Go to this page and select the installation package of the corresponding system, download it and install it.



 

     The installation is the same as installing qq, just click the next step for a fool.

    

    2.2 cudnn 7 for cuda 9.0 installation

   This is relatively pitted, why is it relatively pitted, because cudnn must correspond to the version of cuda, otherwise it will be very troublesome if there is a problem, the cuda I downloaded here is 9.0, and most of them are cudnn to choose: cuDNN v7.0.5 (Dec 5, 2017), for CUDA 9.0

Official download address (need to register nvidia to download):

https://developer.nvidia.com/rdp/cudnn-download

 

 

In fact, there is no need to install it at all, just unzip the downloaded zip file, and then copy the files inside to the directory of the cuda installation location. Specifically, there are three files to be copied to the three directories of cuda.



 

 

 

   After these are done, it is completed. You can open cmd, enter python, and enter the python shell:



 

 

 

 

 

 

Guess you like

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