Keras – 9.2 Build&Train VGG Net With CIFAR10 Dataset (Keras)

Welcome to CS With James

In this tutorial I will discuss about the VGG Net

If you look at the result of the image-net challenge the VGG net win the competition on 2014. They built more layers (19 layers) compare to AlexNet (8 layers). Still using the traditional sequential architectural design for the neural network. 

Let’s look at the visualization of the VGG Net

I don’t think I have to talk details about each layer because now you should be able to understand how it works just by looking at the code. 

So here is the code

Now they are not doing the pooling right after the convolutional layer so they can extract more features from tensor without shrink the size of the tensor. However, as I mentioned earlier, it is still using the traditional sequential design.

To be honest there is not so much that I can explain about this network. The only “special” thing about this network is there are no normalization layer or dropout layer used on the convolutional layers, which can prevent from overfitting.

Let’s go straight into the result

I trained VGG Net on CIFAR10 Dataset with 1k epochs.

There was a problem, here is the result of the VGGNet trained with CIFAR10

The result is 43% accuracy, I tried to change modify the layers but I couldn’t find out the best layer design, however I decided to show you this because it can be a example for the bad network design.

This is happening because all the networks are designed for the Image-Net dataset which have much bigger input shape. So if I implement the network for the image-net then sometimes it will take the tensor too small and lose the features to learn 

If I keep train this up to 2k epochs there is possibility that this is work better but it is waste of time so I decided not to do so.

Leave a Reply

Your email address will not be published. Required fields are marked *