Anaconda installation tensorflow-gpu environment detailed configuration tutorial under win10 system

One, install Anaconda

1. Download Anaconda

Download URL, click to download
Insert picture description here

2. Install Anaconda

Insert picture description here
Insert picture description here
Insert picture description here
Choose the installation directory by yourself. Later, as the installed modules will take up more space,
Insert picture description here
you can check the automatic configuration environment or uncheck the manual configuration environment.
Insert picture description hereInsert picture description here
Choose to install VScode according to your personal needs.
Insert picture description here

3. Add anaconda environment

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

After the addition is successful,
Win+R starts cmd, enter the following command to view your installed version

conda -V

Two, install TensorFlow-GPU, Keras

1. Create a TensorFlow environment

Win+R start cmd, enter the following command in the command prompt:

1 | conda create –n tensorflow-gpu python=3.7
2 | activate tensorflow-gpu
3 | pip install tensorflow-gpu==1.13.2
4 | pip install keras==2.1.5

If the above command download is too slow, you can use Douban source to speed up the download:

3 | pip install -i https://pypi.doubanio.com/simple/ tensorflow-gpu==1.13.2
4 | pip install -i https://pypi.doubanio.com/simple/ keras==2.1.5

Three, install CUDA and cuDnn

1. Check your computer GPU model

This computer -> right click management
Insert picture description here

Click the following URL to view your GPU computing power, you can download the corresponding Cuda and cudnn according to the graphics card computing power to
view your own graphics card model
Insert picture description here

2. Download CUDA10.0 and cuDnn7.4.1.5

CUDA10.0 download official website
cuDnn need to manually find 7.4.1.5 install
cuDnn download official website The
above method download is too slow, you can use the following link to download
Baidu network disk link: https://pan.baidu.com/s/1Prck69Mei9DyJxjS0nvTCg
extraction code: p281

3. Install CUDA10.0

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

4. Install cuDnn7.4.1.5

After installing CUDA, open the following location
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0
and unzip all the contents of Cudnn and copy them to the above directory.

Four, test

import tensorflow as tf
tf.test.gpu_device_name()

Prompt the following information to install successfully
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_40076022/article/details/108419060