预加载模型Pytorch 本文实现功能: 首先加载Pytorch中的VGG16预训练模型(只包括前面的卷积提取特征部分); 然后,在后面加入一个卷积层; 最后,加一个分类器。 1.加载Pytorch中的VGG16预训练模型 #高版本torch weights=True pretrained_net = models.vgg16_bn(weights=True) #低版本torch pretrained=True pretrained_net = models.vgg16_bn(pretrained=True)