Implementing a pretrained model

Remember the Guiseppe toys dataset we played with in Chapter 1Introduction to PyTorch? We now finally have the tools and knowledge to be able to create a classification model for this data. We are going to do this by using a model pretrained on the Imagenet dataset. This is called transfer learning, because we are transferring the learning achieved on one dataset to make predictions on a different, usually much smaller, dataset. Using a network with pretrained weights dramatically increases its performance on much smaller datasets, and this is surprisingly easy to achieve. In the simplest case, we can pass the pretrained model a data of labeled images and simply change the number of output features. Remember ...

Get Deep Learning with PyTorch Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.