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.

Using fine-tuning

Using fine-tuning

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

Start my 1-month free trial

Using fine-tuning

- Let's look at Fine-tuning in our notebooks. So I head over to the Exercise folder. And I grab the Fine-tuning notebook. Now, as you can see, there are a couple of sections in this notebook. And we'll look at each of them in turn. Now one of the things we want to check is that we're using the GPUs for this section. So going to select Edit and Notebook Session, and I can confirm that I'm using the GPU. And let's expand the first section of the notebook. So you should be pretty familiar with the first couple of cells of code. I'm just going to reduce the font a little bit. So we download the VGG16 model. And the first thing we want to do with Fine-tuning is to freeze the earlier layers of the network. We do that by specifying parameter.requires_grad = false for all of the model parameters. Now what we want to start doing is to train the fully connected head, so let's take a look at our classifier. So model.classifier.…

Contents