Deep Learning and its Applications using Python
by Niha Kamal Basha, Surbhi Bhatia Khan, Abhishek Kumar, Arwa Mashat
3Understanding and Working with Keras
A python library called Keras has been used for deep learning which work over TensorFlow. The objective and focus of Keras on deep learning with perceptions of creating neural networks layers and its mathematical models. The backend of Keras is TensorFlow. The advantage of this is Keras can run applications independently. Keras is simple, flexible, and powerful. A sequential and functional API’s are two frameworks of Keras. Among these, sequential API has been used at initial stage, which is working on linear stack of layers. The added advantage of using sequential model is easy-to-insert layers. The main features [1] are shown in Figure 3.1
The history of Keras is shown in Table 3.1.
3.1 Major Steps to Deep Learning Models
The number of steps involved in Keras are four [3] in relation with deep learning models, which is shown in Figure 3.2.
Define the model—This is used for creating the model and adding the layers (convolution layer, pooling layer, and fully connected layer), which perform different functions. They are convolution layer, pooling layer, batch normalization layer, and activation function layer.
The model to Compile—The compilation have been done using compile () function before that the loss function, as well as an optimizer are applied.
Fit the model—This is used for training the model with set of test data. The training task is executed by calling fit () function.
Make predictions—The functions used for prediction is ...