thu-nics / MNSIM-2.0

A Behavior-Level Modeling Tool for Memristor-based Neuromorphic Computing Systems
133 stars 37 forks source link

pth格式问题 #4

Closed yin1112 closed 3 years ago

yin1112 commented 3 years ago

1.系统环境

python3.6

pytorch版本1.5.1

2.生成pth数据的代码 模型部分 class Lelnet1(torch.nn.Module): def init(self): super(Lelnet1,self).init() self.conv1 = torch.nn.Conv2d(3,6,(5,5)) self.pool1 = torch.nn.MaxPool2d(2,2)
self.conv2 = torch.nn.Conv2d(6,16,(5,5)) self.pool2 = torch.nn.MaxPool2d(2,2) self.conv3 = torch.nn.Conv2d(16,1,(1,1)) self.fc1 = torch.nn.Linear(25,84) self.fc2 = torch.nn.Linear(84,10) model = Lelnet1()

保存方式 torch.save(model.state_dict(), './model.pth') 3.系统上的更改 image

在这里加上自己的网络和配置

4.运行之后产生的报错如下

image

请问要如何修改才可以跑通。