Closed yin1112 closed 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.系统上的更改
在这里加上自己的网络和配置
4.运行之后产生的报错如下
请问要如何修改才可以跑通。
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.系统上的更改
在这里加上自己的网络和配置
4.运行之后产生的报错如下
请问要如何修改才可以跑通。