diff --git a/python/paddle/vision/models/lenet.py b/python/paddle/vision/models/lenet.py index 119be85db54b90e4841c30e342db87ece1f49dfa..2fb50fc17b9e9f1f9c8af3d5c22d8f0e35c3958a 100644 --- a/python/paddle/vision/models/lenet.py +++ b/python/paddle/vision/models/lenet.py @@ -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)