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

Unlock the full course today

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

Unfreezing and training over the last CNN block onwards

Unfreezing and training over the last CNN block onwards

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

Start my 1-month free trial

Unfreezing and training over the last CNN block onwards

- So, the first thing you want to do is to un-freeze the last CNN block. Now for the VGG16 network the last group is three convolution layers followed by a max pooling layer. So, if you look at the model you're looking at features with index number 24 to 31. Again, I'm going to train for just one epoch. Now, slightly that you'll get better results by training over more than one epoch. I trained over three epochs so that's three entire passes over the training data set and got an accuracy of about 85 percent. So, we're looking at unfreezing one CNN block back so that's from index number 24 to 31 and then you want to be able to train from that last CNN block, to the end of the network. So, as before let's check the accuracy of this model over just five batches. So, the accuracy of this model is just over 80 percent which again is not bad for one pass and there weren't any significant gains by un-freezing and re-training…

Contents