keras keras is high-level deep learning framework for pythonwhich is capable of running on top of both theano and tensorflow developed by francois cholletthe most important advantage of using keras is the time saved by its easy-to-use but powerful high level apis that enable rapid prototyping for an idea keras allows us to use the constructs offered by tensorflow and theano in much more intuitive and easy-to-use way without writing excess boilerplate code for building neural network based models this ease of flexibility and simplicity is the major reason for popularity of keras in addition to providing an easy access to both of these somewhat esoteric librarieskeras ensures that we are still able to take the advantages that these libraries offer in this sectionyou learn how to install keraslearn about the basics of model development using kerasand then learn how to develop an example neural network model using keras and tensorflow installation keras is easy to install using the familiar pip or conda command we will assume that we have both tensorflow and theano installedas they will be required to be used as backend for keras model development conda install keras we can check for the successful installation of keras in our environment by importing it in ipython upon successful import it will display the current backendwhich is usually theano by default so you need to go to the keras json fileavailable under the keras directory under your user account directory our config file contents are as follows {"epsilon" - "floatx""float ""backend""tensorflow""image_data_format""channels_last"you can refer to keras from theano to tensorflow once the backend in specified in the config fileon importing kerasyou should see the following message in your ipython shell in [ ]import keras using tensorflow backend keras basics the main abstraction for neural network is model in keras model is collection of neurons that will define the structure of neural network there are two different types of models sequential modelsequential models are just stacks of layers these layers can together define neural network if you refer back to figure - when we introduced neural networksthat network can be defined by specifying three layers in sequential keras model we will see an example of sequential model later in this section functional api modelsequential models are very useful but sometimes our requirement will exceed the constructs possible using sequential models this is where the function model apis will come in to the picture this api allows us to specify complex networks networks that can have multiple outputsnetworks with shared layersetc these kinds of models are needed when we need to use advanced neural networks like convolutional neural networks or recurrent neural networks