DEV Community

Cover image for Machine Learning - Understanding Convolutional Neural Networks
Sandeep Balachandran
Sandeep Balachandran

Posted on

Machine Learning - Understanding Convolutional Neural Networks

Hey there,

I think most of the concepts are already covered. So far we've seen that CNN's perform really well at classifying images. However, at this point, we don't really know how these CNN's actually work. If we could understand what a CNN is actually learning, then in principle, we should be able to improve it even further. One way to try to understand CNNs is by visualizing the convolutional layers. Just take a look at the link below to learn more about how to visualize convolutional layers:

Understanding your Convolution network with Visualizations

Summary

In this lesson we learned how we can use Transfer Learning to create very powerful Convolutional Neural Networks with very little effort. The main key points of this lesson are:

  • Transfer Learning: A technique that reuses a model that was created by machine learning experts and that has already been trained on a large dataset. When performing transfer learning we must always change the last layer of the pre-trained model so that it has the same number of classes that we have in the dataset we are working with.
  • Freezing Parameters: Setting the variables of a pre-trained model to non-trainable. By freezing the parameters, we will ensure that only the variables of the last classification layer get trained, while the variables from the other layers of the pre-trained model are kept the same.
  • MobileNet: A state-of-the-art convolutional neural network developed by Google that uses a very efficient neural network architecture that minimizes the amount of memory and computational resources needed, while maintaining a high level of accuracy. MobileNet is ideal for mobile devices that have limited memory and computational resources.

You also used transfer learning to create a Convolutional Neural Network that uses MobileNet to classify images of Dogs and Cats. You were able to see that transfer learning greatly improves the accuracy achieved in the Dogs and Cats dataset. As an exercise, you were able to apply everything you learned in this lesson to create your own CNN using MobileNet to classify images of flowers.

So you all are waiting for the code right? Let us start with the Celsius V Fahreheit example in Google Colab.

Top comments (0)