import torchvision.models as models
pytorch已定义models详看:Models and pre-trained weights — Torchvision main documentation
构造示例:
import torchvision.models as models
alexnet = models.alexnet() # AlexNet
vgg16 = models.vgg16() # VGG16
resnet18 = models.resnet18() # ResetNet模型
googlenet = models.googlenet() # googlenet
inception = models.inception_v3() # inception
squeezenet = models.squeezenet1_0() # 序列网络
densenet = models.densenet161() # 稠密网络
shufflenet = models.shufflenet_v2_x1_0()
mobilenet_v2 = models.mobilenet_v2()
mobilenet_v3_large = models.mobilenet_v3_large()
mobilen