the simplest solution is to:

copy over the vgg file
change the name of the class
modify the class (for example remove or replace layers as you see fit)
use the function load_state_dict 193 to load the original VGG weights dict into this modified class.

This is less error prone, and it’s easily modifiable.
The vgg weights state dict is available in this URL: https://github.com/pytorch/vision/blob/master/torchvision/models/vgg.py#L12-L21 533