Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1.62 KB

01_installation.md

File metadata and controls

56 lines (41 loc) · 1.62 KB

Installation

https://www.tensorflow.org/install

0. Optional: GPU Support

https://www.tensorflow.org/install/gpu

  1. Install Visual Studion 2017 Free Version and C++ Redistributable:

  2. Install CUDA Toolkit 10.1 https://developer.nvidia.com/cuda-toolkit-archive

  3. Install NVIDIA cuDNN version 7 https://developer.nvidia.com/cudnn

Download (you need an account) and copy the dll, include, and lib files in the corresponding directories of the CUDA Toolkit installation directory

  1. On Windows: Modify environment variables (paths must match your installation directory):
  • Add variable
CUDA_PATH = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin

Add 2 entries to PATH variable:

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp

1. Installation

  1. Create a virtual environment and activate it (e.g. with conda or virtualenv)
conda create -n tf python=3.8
conda activate tf
  1. Install with
pip install tensorflow

2. Verification:

import tensorflow as tf
print(tf.__version__)

# test gpu
physical_devices = tf.config.list_physical_devices("GPU")
print(len(physical_devices))