pytorch官網提供的只有參數
如果直接load模型print只有參數
import torch
import torchvision.models as models
# pretrained=True 使用預訓練的模型
net = models.resnet101(pretrained=False)
pthfile = 'resnet101-5d3b4d8f.pth'
net.load_state_dict(torch.load(pthfile))
print(net)
print出來就是網絡模型