未验证 提交 cdc4e662 编写于 作者: L LielinJiang 提交者: GitHub

fix lenet num classes (#28642)

上级 80d20246
......@@ -49,7 +49,8 @@ class LeNet(nn.Layer):
if num_classes > 0:
self.fc = nn.Sequential(
nn.Linear(400, 120), nn.Linear(120, 84), nn.Linear(84, 10))
nn.Linear(400, 120),
nn.Linear(120, 84), nn.Linear(84, num_classes))
def forward(self, inputs):
x = self.features(inputs)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册