Installation Guide 2021

Installation Guide 2021


description: Installation Guide for Deep Learning 2021

Installation Guide

Installation Guide for Win10

This installation guide is for programming a deep learning application using Pytorch or Tensorflow.

Make sure you install the correct software version as instructed.

For DLIP 2021-1 Lecture:

  • Python 3.7, CUDA 10.2, cuDNN 8.0.5

  • PyTorch 1.10.x

  • Anaconda for Python 3.7 or Anaconda of Latest Version


Installation Steps

(updated 2021.4)

1. Install Anaconda

Anaconda : Python and libraries package installer.

Follow: How to install Anaconda

2. Install Python & Numpy & OpenCV

Install Python

Python 3.7 (2022-1)

Python is already installed by installing Anaconda. But, we will make a virtual environment for a specific Python version.

  • Open Anaconda Prompt(admin mode)

  • First, update conda

conda update -n base -c defaults conda
  • Then, Create Virtual environment for Python 3.7. Name the $ENV as py37

conda create -n py37 python=3.7

After installation, activate the newly created environment

conda activate py37

Install Numpy, OpenCV, Matplot

conda activate py37

conda install numpy
conda install -c conda-forge matplotlib
conda install -c conda-forge opencv

If installed Numpy is not recognized after installation with conda, then install Numpy using pip

pip install numpy

3. Install IDE (Visual Studio Code)

Follow: How to Install VS Code

Also, read about

4. Install GPU library (CUDA, cuDNN)

Skip this if you do not have GPU.

Nvidia GPU driver and Library : To operate the GPU.

  • CUDA — GPU C library. Stands for Compute Unified Device Architecture.

  • cuDNN — DL primitives library based on CUDA. Stands for CUDA Deep Neural Network.

Follow How to install CUDA and cuDNN

5. Install DL Framework

Framework

  • TensorFlow — DL library, developed by Google.

  • Keras — DL wrapper with interchangeable backends. Can be used with TensorFlow, Theano or CNTK.

  • PyTorch — Dynamic DL library with GPU acceleration.

Install Pytorch

Read more about PyTorch installation

  • With GPU

# CUDA 10.2
conda activate py37
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=10.2 -c pytorch

Latest PyTorch does not support CUDA 10.2 . please use CUDA-11.3 for Latest version.

  • Without GPU

# CPU Only
conda activate py37
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cpuonly -c pytorch

Install Tensorflow and Keras

  • Run 'Anaconda Prompt(admin)'

  • Activate virtual environment

  • install tensorflow-gpu 2.3.0 packages

  • install keras

conda create -n py37tf23 python=3.7
conda activate py37tf23 
conda install tensorflow-gpu=2.3.0
conda install keras

6. Installing Other libraries

conda activate py37

conda install -c conda-forge matplotlib
conda install -c conda-forge opencv
conda install -c anaconda scikit-learn
conda install -c anaconda pandas
conda install jupyter
conda install -c anaconda ipykernel

Last updated