Getting started with Tensorflow , keras and theano - Development setup with Anaconda Installation


Below are the steps to setup your development environment  for Deep learning :


1.) Download and Install Anaconda from here :https://www.continuum.io/downloads
2.) Create a conda environment for data science development so that it doesn't affect the other install components .
    conda create -n tensor_keras_py3.5 python=3.5 pandas scikit-learn jupyter matplotlib
3.) Activate the created environment
    source activate tensor_keras_py3.5
4.) Install tensorflow inside activated env.
    pip install tensorflow
5.) Install keras inside activated env.
   pip install keras
6.) Install opencv inside activated env.
   pip install opencv-python
7.) Install IMUTILS
 pip install imutils


Test your environment


1.) Type ipython in the shell , which should open ipython console .
2.) Type import tensorflow,keras  , it should reply using tensorflow backend 



Switching keras backend from Tensorflow to theano

keras backend is set in a hidden file stored in your home path . You can find it at $/.keras/keras.json . You can open it with a text editor and you should see something like this :


{ "image_dim_ordering": "tf", "epsilon": 1e-07, "floatx": "float32", "backend": "tensorflow" }



You can change backend to theano . save it and close it . Now if you open ipython and do import keras then it will return using theano backend






Comments

Post a Comment