Hi guys,
I meet a problems when loading the pretrained vgg model parameters provided by torchvision.
In the vgg16 provided by torchvision, they warp all the conv layers in the self.features, and all the FC layers in the self.classifier.
How ever, I didn’t warp the conv layers like torchvision.
I warp all the conv layers in 5 stages called stage1,2,3,4,5.
For example, the first conv layer in vgg16 ‘Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))’, in torchvision_vgg, it called vgg.features[0]. But in my net it called vgg.stage1[0].
So the .load_state_dict won’t work, because the name of the layers aren’t same.
What should I do to load the pretrained parameters.