Alwyn Mathew     Publication     Talks     Teaching     Blog     Resume

Install Pytorch, Tensorflow and Keras

Deep learning frameworks

Deep learning frameworks offer building blocks for designing, training and validating deep neural networks, through a high level programming interface. Widely used deep learning frameworks such as Caffe2, Cognitive toolkit, MXNet, PyTorch, TensorFlow and others rely on GPU-accelerated libraries such as cuDNN and NCCL to deliver high-performance multi-GPU accelerated training.

Check CUDA version

nvcc --version // for gpu

Install Pytorch

conda create --name <env-name> python=<version-no.>
source activate <env-name>
conda install pytorch-cpu torchvision-cpu -c pytorch // cpu version
conda install pytorch torchvision -c pytorch // gpu version, select appropiate CUDA version

Install Tensorflow

conda create --name <env-name> python=<version-no.>
source activate <env-name>
pip install tensorflow==<version-no.> // cpu version
pip install tensorflow-gpu==<version-no.> // gpu version 

Compatibility of tensorflow-gpu with appropiate CUDA verison from here

Install Keras with Tensorflow

conda create --name keras python=<version-no.>
source activate keras
pip install tensorflow==<version-no.> // use gpu or cpu version
pip install keras