From the course: Transfer Learning for Images Using PyTorch: Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Training the fixed feature extractor

Training the fixed feature extractor

From the course: Transfer Learning for Images Using PyTorch: Essential Training

Start my 1-month free trial

Training the fixed feature extractor

We'll be looking at training the network shortly, so let's get an intuitive understanding of what we're doing when training the network. So what we do is take the entire training CIFAR dataset and divide them up into batches. We then pass a batch of images with labels to the VGG-16 network, and in our example, this is a batch of 64 CIFAR-10 images with the 10 classes and the labels. These labels state which class the image belongs to. So let's take a look at one of these batches. The weights, represented by W in the diagram, contain information that VGG-16 has learned from CIFAR-10 data that passes through it. Now remember that we have frozen all of the layers so none of the weights will get modified. This is because the VGG-16 model has been pre-trained on the image net dataset. So the weight values have already been adjusted after they've been trained with a million images. We then define the fixed feature extractor and…

Contents