ChawDoe / LeNet5-MNIST-PyTorch

The simplest implementation of LeNet5 with mnist in PyTorch. Accuracy: ~99%
MIT License
193 stars 56 forks source link

Why I get 0.61 on lr=1e-1 and epoch=100? #1

Closed RosabanksiaeAit closed 2 years ago

ChawDoe commented 3 years ago

The initial weight of network is crucial to the final perfomance.
You can run multiple models to see which is best. I think the best performance would be bigger than 0.61. What's more, 100 epoch may be too much for this task. The model may be over-fitting the training data.

maruncong commented 3 years ago
    self.fc2 = nn.Linear(120, 64) #84
    self.relu4 = nn.ReLU()
    self.fc3 = nn.Linear(64, 10) #84

model里面两个84改成64

ChawDoe commented 3 years ago
    self.fc2 = nn.Linear(120, 64) #84
    self.relu4 = nn.ReLU()
    self.fc3 = nn.Linear(64, 10) #84

model里面两个84改成64

Maybe it's a good idea to avoid over-fitting. image