Understanding the VGG16 architecture
VGG stands for Visual Geometry Group, which is based out of the University of Oxford. 16 stands for the number of layers in the model. The VGG16 model is trained to classify objects in the ImageNet competition and stood as the runner-up architecture in 2014. The reason we are studying this architecture instead of the winning architecture (GoogleNet) is because of its simplicity and its broader use by the vision community for several other tasks.
Let’s understand the architecture of VGG16 along with how a VGG16 pretrained model is accessible and represented in PyTorch.
The following code can be found in the VGG_architecture.ipynb
file located in the Chapter05
folder on GitHub at https://bit.ly/mcvp-2e.
To get started with using the VGG16 pretrained model in PyTorch, follow these steps:
- Install the required packages:
import torchvision import torch.nn as nn import torch import torch.nn.functional...