[PYTHON] [Environment construction] @anaconda that runs keras / tensorflow on GPU

Note

――I hope you can think of it as a personal memo when building the environment again someday. ――Since the evolution is fast, the version may be different from the current one. ――We cannot take responsibility for "it broke when you tried it", so thank you. .. ..

The site I used as a reference, qiita

-Install TensorFlow 2.2 (GPU compatible) (on Windows) -Installing NVIDIA CUDA Toolkit 10.1, 10.0 (on Windows) -Install Visual C ++ Build Tools 2019 (Build Tools for Visual Studio 2019) (on Windows) -[Solving the problem that GPU is not recognized even though it is Cuda 10.1 in TensorFlow 2.1](https://medium.com/lsc-psd/tensorflow2-1%E3%81%A7cuda10-1%E3%81%AA% E3% 81% AE% E3% 81% ABgpu% E3% 81% 8C% E8% AA% 8D% E8% AD% 98% E3% 81% 95% E3% 82% 8C% E3% 81% AA% E3% 81% 84% E5% 95% 8F% E9% A1% 8C% E3% 81% AE% E8% A7% A3% E6% B1% BA% E6% B3% 95-6be5137ec216) -Summary of CUDA + cuDNN installation

environment

1. Install Visual Studio

-Download from here --Required to use the CUDA toolkit described below --Select "Desktop development with C ++" for the workload on the setting screen after download.

2. Install CUDA toolkit

-Download version 10.1 (when using tensorflow2.x) from here --Check the version with nvcc -V

3. Install cuDNN

-Download version 7.6 from here (when using tensorflow2.x) --Membership registration is required.

For the installation of CUDA toolkit and cuDNN, please refer to the reference site, which is very carefully summarized.

4. Enter the anaconda virtual environment and check the following

――This time we created a new virtual environment. --Check if the result cudnn 7.6.5 cuda10.1_0 is returned by conda list cudnn. --If the above result is not obtained, execute conda install cudnn = 7.6.5 = cuda10.1_0.

5. Install TensorFlow 2.1

6. Install keras 2.3.1.

7. Check if it can be used with jupyter notebook

Is the GPU recognized?

--If the GPU is recognized, the result will include the description device_type:" GPU "

import temsorflow
from tensorflow.python.client import device_lib
device_lib.list_local_devices()

――After that, if you import tensorflow and keras, you can use it in my environment.

Recommended Posts

[Environment construction] @anaconda that runs keras / tensorflow on GPU
[Ubuntu 18.04] Tensorflow 2.0.0-GPU environment construction
Anaconda environment construction on CentOS7
Ubuntu14.04 + GPU + TensorFlow environment construction
[Tensorflow] Tensorflow environment construction on Windows 10
Building a TensorFlow environment that uses GPU on Windows 10
Anaconda python environment construction on Windows 10
Anaconda environment construction on Mac (2018 version)
Python environment construction (pyenv, anaconda, tensorflow)
Environment construction of TensorFlow + JupyterNotebook + Matplotlib on Windows version Anaconda (August 2017 version)
Introducing keras on virtual environment (pyenv: anaconda) on server by conda (tensorflow backend)
June 2017 version to build Tensorflow / Keras environment on GPU instance of AWS
[0] TensorFlow-GPU environment construction built with Anaconda on Ubuntu
Anaconda environment construction memo
Python + Anaconda + Pycharm environment construction
Introduced Tensorflow (Win / Anaconda environment)
Anaconda3 python environment construction procedure
Anaconda3 × Pycharm environment construction memo
Python environment construction and TensorFlow
Linux environment construction (on WSL environment)
Python environment construction on Mac (pyenv, virtualenv, anaconda, ipython notebook)
I tried to create a server environment that runs on Windows 10
Python environment construction memo on Windows 10
Try running tensorflow on Docker + anaconda
Environment construction of Tensorflow and Chainer by Window with CUDA (with GPU)
Python environment construction memo on Mac
[TensorFlow] [Keras] Neural network construction with Keras
install tensorflow in anaconda + python3.5 environment
Python development environment construction on macOS
Use Tensorflow 2.1.0 with Anaconda on Windows 10!
[Linux] Docker environment construction on Redhat
Environment construction of python3.8 on mac
Python3 TensorFlow for Mac environment construction
Environment construction of "Tello_Video" on Ubuntu
Python3.6 environment construction (using Win environment Anaconda)
OpenCV3 & Python3 environment construction on Ubuntu
For those who don't have Keras or TensorFlow on GPU on macOS Sierra
Run TensorFlow on a GPU instance on AWS
Vue.js + Flask environment construction memorandum ~ with Anaconda3 ~
I installed TensorFlow (GPU version) on Ubuntu
Build Python environment with Anaconda on Mac
GeoDjango + SQLite environment construction on OS X
I built a TensorFlow environment on windows10
Python3 TensorFlow environment construction (Mac and pyenv virtualenv)
[Note] Python environment construction on rental server "CORESERVER"
Put Python's numerical calculation environment Anaconda on mac (2)
Put Python's numerical calculation environment Anaconda on mac
MacOS 10.11 environment construction: Powerline with Anaconda and Dein.vim
Try Tensorflow with a GPU instance on AWS
Python environment construction (Anaconda + VSCode) @ Windows10 [January 2020 version]
[Node-RED] Execute Python on Anaconda virtual environment from Node-RED [Anaconda] [Python]
From Python environment construction to virtual environment construction with anaconda
[Windows] Memo to use Keras on GPU [Tensorflow-GPU]