ICP 11 - AsharGit/Python-ICP GitHub Wiki
a. Description about the ICP
In this ICP we are given 3 tasks
- Add additional layers to our model to see if we see an improvement in the performance.
- Use 4 sample images in the test set to see how accurate our model is in predicting image category. As a bonus we load our model from .h5 file.
- Create an accuracy and loss plot
b. Objective
In this ICP we are building a CNN model to help image classification. We are using the Cifar-10 data set in this ICP.
c. Design/ implementation(include screenshots with explanations)
We start our ICP with a given source code, we simply run the code to see what our base accuracy is

Our base model accuracy is 71.31%
We also plot the accuracy and loss of our model
Accuracy

Loss

The first task of the ICP is to apply additional layers and see if it changes performance

Using the new model we execute the code again.

The accuracy of the new model is 79.67%, an improved accuracy of 8.36%
Task 3 of the ICP asks us to plot the accuracy and loss of this new model
We use matplotlib and assign our variables to create our plot

Accuracy

Loss

For task 2 we evaluate the first 4 images in the test data set and predict the correct category using our model
As a bonus we are supposed to load our model from a h5 file
We can save the model as an h5 file by using the model.save function

Now we can load up the model by using load_model
We use a list of categories so we can display results as string rather than as int's
Next we can use the test data to make our prediction
Finally we a run a loop to display the first 4 images, their real category, and the predicted category from our model

Our prediction model on the first 4 images in the test data set
