Intro to keras and installation

Table of Contents

  1. What is Keras? 
  2. Why Keras?
  3. Installing Keras on Anaconda.
  4. Video Tutorial
  1. What is Keras? 
  1. Keras is a high-level neural networks API written in Python and capable of running on top of TensorFlow or Theano.
  2. It was developed with a focus on enabling fast experimentation it runs seamlessly on both CPU and GPU.
  3. Keras supports feed-forward neural networks, convolutional and recurrent networks and we can even combine them to build more complex models.
  4. As Keras being modular in nature, It is incredibly expressive, flexible, and apt for innovative Research
  5. Keras is a completely Python-based framework so it is very easy to debug and explore.

2 Why Keras?

  1. As there are many deep learning frameworks available today why we are choosing the Keras framework is because it has an API designed for human beings not for machines it offers consistent and simple APIs that minimize the number of user actions required for common use cases.
  2. Keras has stronger adaptation in both the industry and the research community .it is in use at Netflix, Uber and many others it is especially popular among startups that place deep learning at the core of their products 
  3. Keras has also been adopted by researchers at large scientific organizations like NASA
  4. Keras models can be easily deployed across a greater range of platforms like iOS, Android Google cloud or even on Raspberry Pi
  5. Keras models can be developed with a range of different deep learning backends importantly we can train a model with one back-end and load it with another.
  6. It successfully works on top of TensorFlow and Theano with multi GPU and distributed training.
Figure-1
  1. According to KDnuggets polls, Keras is one of the rapidly growing data analysis and machine learning tools.
  2. From the above graph, it is clear that the demand for deep learning is increasing along with Tensorflow and Keras.

3. Installing Keras on Anaconda

a Step-1: download and install latest version of Anaconda on Windows 10

Firstly to download and install the latest version of anaconda we will go to the official page of anaconda it will help us to land on the download page.

Figure-2
  1. This is the download page of anaconda download it based on your computer where we are going for the option 64-bit graphical installer.
  2. Then it will take a few minutes to download, after finishing the download, we will go to the file location in pc.
Figure-3

Run the anaconda Exe file for installation it will start with the above welcome page press next to continue.

Figure-4

Agree to all the terms and conditions then we will install this anaconda in all my users. To do this we will check all user options and we need administrative privilege.

Figure-5

Python 3.7 will allow other programs to automatically detect anaconda I will also go with this one it will add anaconda to the system path environment then press install and it will start the installation and this installation will take few minutes.

  1. we will go to the anaconda prompt so just need to write anaconda I have to open this so this is our anaconda prompt now we will check our available python version in anaconda to do so we have to just write Python — version
  2.  Python 3.7 version is available in my anaconda environment now we will go to the anaconda navigator and explore it now.
Figure-6

Our anaconda prompt will look like below image . Now we will check our available python version in anaconda to do that we have to just write Python  –version

Figure-7

 Python 3.7 version is available in my anaconda environment now we will go to the anaconda navigator which is available in start menu and explore it now.

Figure-8
  1. We have only one environment the base one in home we have spider Jupiter lab applications and those are already available in our anaconda environment. 
  2. We can even install more applications just by pressing this install button.

a Step-2: Create New Environment:

  1. In the second step, we will create a new Conda environment to do this operation we need to open a new anaconda prompt then right-click on it and run as administrator
  2. Now we will create a new environment deepkeras .It is always a good idea to assign a unique name and that will help us to identify different environments 
  3. To create a new environment we have to write Conda create name the name of the environment in our case it’s deep keras.
Figure-9
Figure-10

we have created our environment successfully now we have to activate this one so it’s pretty simple we have to use just activate then name of the environment you can see we are now in the new environment deep keras.

3 Install Keras:

  1. To install this we have to open anaconda prompt and continue with the code conda install -c anaconda keras
  2. so it is saying that we have to install these packages so we are proceeding y to continue so fast it will download then install the packages on our new environment.
Figure-11
  • Till now we have installed anaconda on Windows 10 machine then we have created a new environment deep Keras and activated that then we have installed Keras in the same environment
  • We can observe in the above image that we are in deep Keras new environment. 
  • First, we will install the spider and Jupiter tool so we will use the simple command.
Figure-12
  1. After the installation of Jupiter is finished now we will install the important libraries pandas and matplotlib.
  2.  so first we will install pandas so we will use the same command Conda install pandas and finally we will install matplotlib libraries
  3. so we have installed Jupiter spider then two libraries pandas and matplotlib
  4. Now we will go to the Anaconda navigator in the environment tab now we have two environments the previously it was only the base environment now we have deepkeras environment so these all are the install packages available in our environment.
Figure-14
  1.  I will go to the home and change the environments we have already installed Jupiter notebook and spider in our new deepkeras environment now we will launch spider.
  2. First, we will try to import Keras using import Keras if Keras is installed properly it will not provide any error.
Figure-15

It has imported keras without any error using TensorFlow as backend it is working perfectly.

Video Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *