Building Machine Learning Environment!【WindowsOS】
Introduction
Suppose we use these
- Python3
https://www.python.org/downloads/ - Anaconda
https://docs.anaconda.com/anaconda/install/ - CUDA
https://developer.nvidia.com/cuda-downloads - cuDNN
https://developer.nvidia.com/rdp/cudnn-download - TensorFlow
https://www.tensorflow.org/install
※Notes
- If you use other tools, please refer to other articles
- Articles on how to build Python3 and Anaconda environments are plentiful, so I will skip them.
- You will be asked to register as an NVIDIA user during the process of building the environment, but please do so as it is free.
CUDA
1. Open CUDA download page
2. Donwload installer
Slect following
Windows
↓
x86_64
↓
Your WindowsOS version
↓
exe (local)
3. Install
Select and install downloaded installer in your exploror
※When you install you'll be asked a lot of question. It's ok to select positive of all.
cuDNN
1. Open cuDNN download page
2. Donwload installer
Check to Agree
Download installer with attention to version
Select Local Installer for Windows (Zip)
3. Extract ZIP file
4. Install to move cuDNN file to CUDA folder
Open explorer
Open CUDA folder
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\<バージョン>
に移動
Open cuDNN folder
Move each cuDNN files in bin
、include
, lib
to
each CUDA folders in bin
、include
, lib\x64
State is each cuDNN folders such as bin
、include
, lib
don't have files, and
each CUDA folders such as bin
、include
, lib\x64
have each cuDNN files such asbin
、include
, lib
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\<version>\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\<version>\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\<version>\lib\x64
TensorFlow
1. Open Anaconda Navigator
2. Select Environments
Create
at bottom left
3. Click 4. Build TensorFlow virtual environment
※Create both CPU version and GPU version
In the case of CPU
Create after input Name to tf-cpu
In the case of GPU
Create after input Name to tf-gpu
5. Install TensorFlow each environments
※Install both CPU version and GPU version
In the case of CPU
Push Open terminal after select tf-cpu
↓
$ pip install tensorflow
↓
Confirm. Success if the following.
$ python
↓
>>
↓
>> import tensorflow
↓
>>
In the case of GPU
Push Open terminal after select tf-gpu
↓
$ pip install tensorflow-gpu
↓
Confirm. Success if the following.
$ python
↓
>>
↓
>> import tensorflow
↓
>>
End
Discussion