- 1. Python 徒手实现卷积神经网络 CNN
- 2. 全局平均池化层(GAP)
- 3. Pytorch模型的保存与加载
- 4. pytorch如何保证可重复性
参考:https://blog.csdn.net/qq_44747572/article/details/120949318?spm=1001.2014.3001.5501
2. 全局平均池化层(GAP)参考:https://www.malaoshi.top/show_1EF4YsF7RPkg.html
3. Pytorch模型的保存与加载参考: https://zhuanlan.zhihu.com/p/73893187
问题1: 模型加载出现问题
vgg16 = torch.load('./vgg16.pth')
TypeError: ‘collections.OrderedDict’ object is not callable
解决1:
bash import torchvision.models as models path = "./vgg16.pth" vgg16 = models.vgg16(pretrained=False).eval() vgg16.load_state_dict(torch.load(path))4. pytorch如何保证可重复性
参考:https://zhuanlan.zhihu.com/p/81039955
待学习。。。



