👌

Building Machine Learning Environment!【WindowsOS】

2022/04/03に公開

Introduction

Suppose we use these

※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

https://developer.nvidia.com/cuda-11-5-0-download-archive

2. Donwload installer

Slect following

Windows

x86_64

Your WindowsOS version

exe (local)
image.png

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.
image.png

cuDNN

1. Open cuDNN download page

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

2. Donwload installer

Check to Agree
image.png

Download installer with attention to version
Select Local Installer for Windows (Zip)
image.png

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\<バージョン>に移動
image.png

Open cuDNN folder
image.png

Move each cuDNN files in bininclude, lib to
each CUDA folders in bininclude, lib\x64

State is each cuDNN folders such as bininclude, lib don't have files, and
each CUDA folders such as bininclude, lib\x64 have each cuDNN files such asbininclude, lib

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\<version>\bin
image.png
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\<version>\include
image.png
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\<version>\lib\x64
image.png

TensorFlow

1. Open Anaconda Navigator

image.png
image.png

2. Select Environments

image.png

3. Click Create at bottom left

image.png

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

image.png

5. Install TensorFlow each environments

※Install both CPU version and GPU version

In the case of CPU

Push Open terminal after select tf-cpu
image.png

$ pip install tensorflow


Confirm. Success if the following.

$ python
↓
>>
↓
>> import tensorflow
↓
>>

In the case of GPU

Push Open terminal after select tf-gpu
image.png

$ pip install tensorflow-gpu


Confirm. Success if the following.

$ python
↓
>>
↓
>> import tensorflow
↓
>>

End

Discussion