Table of Contents
- What is Keras?
- Why Keras?
- Installing Keras on Anaconda.
- Video Tutorial
- What is Keras?
- Keras is a high-level neural networks API written in Python and capable of running on top of TensorFlow or Theano.
- It was developed with a focus on enabling fast experimentation it runs seamlessly on both CPU and GPU.
- Keras supports feed-forward neural networks, convolutional and recurrent networks and we can even combine them to build more complex models.
- As Keras being modular in nature, It is incredibly expressive, flexible, and apt for innovative Research
- Keras is a completely Python-based framework so it is very easy to debug and explore.
2 Why Keras?
- 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.
- 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
- Keras has also been adopted by researchers at large scientific organizations like NASA
- Keras models can be easily deployed across a greater range of platforms like iOS, Android Google cloud or even on Raspberry Pi
- 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.
- It successfully works on top of TensorFlow and Theano with multi GPU and distributed training.
- According to KDnuggets polls, Keras is one of the rapidly growing data analysis and machine learning tools.
- 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.
- This is the download page of anaconda download it based on your computer where we are going for the option 64-bit graphical installer.
- Then it will take a few minutes to download, after finishing the download, we will go to the file location in pc.
Run the anaconda Exe file for installation it will start with the above welcome page press next to continue.
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.
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.
- 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
- Python 3.7 version is available in my anaconda environment now we will go to the anaconda navigator and explore it now.
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
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.
- 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.
- We can even install more applications just by pressing this install button.
a Step-2: Create New Environment:
- 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
- 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
- To create a new environment we have to write Conda create name the name of the environment in our case it’s deep keras.
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:
- To install this we have to open anaconda prompt and continue with the code conda install -c anaconda keras
- 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.
- 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.
- After the installation of Jupiter is finished now we will install the important libraries pandas and matplotlib.
- so first we will install pandas so we will use the same command Conda install pandas and finally we will install matplotlib libraries
- so we have installed Jupiter spider then two libraries pandas and matplotlib
- 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.
- 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.
- First, we will try to import Keras using import Keras if Keras is installed properly it will not provide any error.
It has imported keras without any error using TensorFlow as backend it is working perfectly.