Nvidia MX150 installs Tensorflow-GPU version, Pycharm uses Keras

Use environment: Windows 10 Professional + Pycharm

Need to use: Tensorflow+keras

Sequential installation: CUDA→CUDNN→Tensorflow


Special attention : the correspondence between versions

1. Determine the CUDA version currently supported by the graphics card, download the corresponding CUDA version, and install

NVIDIA official CUDA download address: CUDA Toolkit Archive | NVIDIA Developer

2. According to the installed CUDA version, find the corresponding supported CUDNN version file and replace it in the installed CUDA folder

NVIDIA official CUDNN download address: cuDNN Archive | NVIDIA Developer

Notice! To download CUDNN files, you need to register an Nvidia account. After registering and logging in in the upper right corner, you can open the download accordingly.

3. According to the installed CUDA and CUDNN versions, determine the corresponding supported Tensorflow version, and then use the pip command to install


Installation process:

1. Select the corresponding CUDA and CUDNN files to download

1. Determine the CUDA version, enter the NVIDIA Control Panel → Help → System Information → Components

 It can be seen that the use of CUDA11.4 series is supported , and then enter the NVIDIA CUDA download page

Here I choose the latest 11.4 version in 2022 to install 

2. Go to the NVIDIA CUDNN download page and download the corresponding CUDNN file

 Here I choose the CUDNN for cuda11.4 version in September 21 , and choose to download the file format of Windows X64

2. Confirm again whether the downloaded versions match each other

       Whether the python version, CUDA version, and CUDNN version are all corresponding, and pay special attention to the first three should be corresponding

       Finalize the tensorflow-gpu version

As you can see, we can install tensorflow-gpu version 2.4.0 accordingly

 3. Start to install in sequence

1. Install CUDA

The default installation path starts

Use custom installation, to check the VS option

 

 

 After installation, restart the computer

 Configure environment variables, configure the bin directory and lib\x64 directory under CUDA to the path

 Default installation location C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4

 After configuration, check the CUDA version, in the cmd window, enter nucc -V

2. Install CUDNN

Unzip the downloaded CUDNN file to get a folder named CUDA

Copy and paste all the files in the CUDNN decompression folder to the installation location of CUDA

Default installation location C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4

After copying and pasting, as shown below 

Finally, check whether CUDNN is successfully installed, enter the CMD window, and switch to the CUDA directory

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\extras\demo_suite

Use bandwidthtest to detect, if it shows as PASS, it means the installation is successful

3. Install Tensorflow

Create a virtual environment and install Tensorflow in the virtual environment

 Create a new project in the Tensorflow directory, the project name is project, select the virtual environment interpreter we just created

 In the CMD window, CD to the Tensorflow path we created, pip list, you can see that it is a new environment

 Then we install Tensorflow 2.4.0 version (our corresponding version) with pip in this environment

pip install tensorflow-gpu==2.4.0 -i https://pypi.douban.com/simple/

 After installation, as shown in the figure below

Finally, let's verify whether Tensorflow is installed successfully

CMD command window enters the virtual environment, pip show tensorflow-gpu

 The displayed version information is 2.4.0, and it is imported normally without any error, that is, the installation is successful!

The above are all the installation steps . Since Tensorflow 2.0, Kears has been built in , just import it and use it!


After we installed it, when running Pycharm, some problems that may occur, I wrote another record, so I won’t go into details here

Tensorflow-GPU2.4.0, problems in use_Quite not Quiet's Blog-CSDN Blog


Attachment: CUDA computing power table

CUDA computing power, MX series is 6.1, which is the same as GTX10 series computing power, using Tensorflow-GPU version can greatly improve efficiency

 GTX, RTX system , install TF-GPU version, the same reason.

Supongo que te gusta

Origin blog.csdn.net/weixin_53062121/article/details/123418837
Recomendado
Clasificación