The base convolutional network already contains features that are generically useful for classifying pictures. You do not need to (re)train the entire model. You simply add a new classifier, which will be trained from scratch, on top of the pretrained model so that you can repurpose the feature maps learned previously for the dataset. In this notebook, you will try two ways to customize a pretrained model:įeature Extraction: Use the representations learned by a previous network to extract meaningful features from new samples. You can then take advantage of these learned feature maps without having to start from scratch by training a large model on a large dataset. The intuition behind transfer learning for image classification is that if a model is trained on a large and general enough dataset, this model will effectively serve as a generic model of the visual world. You either use the pretrained model as is or use transfer learning to customize this model to a given task. In this tutorial, you will learn how to classify images of cats and dogs by using transfer learning from a pre-trained network.Ī pre-trained model is a saved network that was previously trained on a large dataset, typically on a large-scale image-classification task.