Skip to content
awais546 edited this page Nov 14, 2020 · 1 revision

Python and Deep Learning

Introduction

In this lab we covered the deep learning through convolutional neural network. Convolutional neural networks are mainly used for image classification. For this lab we trained the model on CIFAR-10 dataset.

Tasks

The tasks are as follows.

  • Modify the model
  • Predict the 4 classes and show it on plot
  • Visualize loss and accuracy using history object
  • Save the model and then predict the images used loaded model

Modify the model

The model is modified by adding multiple convolutional layers, drop outs, max pooling layer and fully connected layer. The summary of the model is given below.

The accuracy of the model before modifying the model is given below.

After the modification the accuracy of the model increased. It is shown below.

Prediction of 4 classes

The model predicted the classes as shown below.

Visualize loss and accuracy

The loss and accuracy of the of the model is shown below.

Save and load model

Save the model using the following code

Load the model using the following screenshot

The following output was generated using the new model loaded.

Clone this wiki locally