Tip of the Day

Do not go where the path may lead, go instead where there is no path and leave a trail.

Keras Installation Instructions

Keras installation in Anaconda (Windows and Mac )
Before installing keras library, make sure you watch previous video of how to create and activate anaconda environment. Follow below steps to install keras:

  1. Open terminal and activate conda environment using below command
    1. For Windows : activate deeplearning
    2. For MacOS : source activate deeplearning
  2. Once conda environment activated, use below command
    1. conda install keras
  3. Proceed installation by pressing “y”.
  4. Once it gets installed. Open python terminal using keyword “python”
  5. Import keras library.
    1. If you dont get any errors, that means your keras library has been successfully installed.
    2. If you get an error, try installing library again
  6. As keras is using tensorflow backend by default, to change keras backend theano instead follow below procedure:
    1. If you are in windows: go to your userprofile directory > .keras > keras.json
    2. If you are in Mac: go to home directory > .keras > keras.json
  7. Open keras.json file and change the backend “tensorflow” to “theano”
  8. If theano library is not installed, write below command in your deeplearning environment,
    1. conda install theano
  9. Once theano gets successfully installed, validate installation by importing theano in python consol
  10. After validating theano installation, open python terminal again and import keras, this time keras will use theano backend instead tensorflow.
SHARE

Himanshu Rai

  • Image
  • Image
  • Image
  • Image
  • Image

0 Comments:

Post a Comment