Experiment shows an undersized neural network underfits MNIST digits even with more training

A DEV Community post compares overfitting and underfitting by training the same neural network on the MNIST handwritten digit dataset under different conditions. The author first tests a model with only two hidden neurons, which trains on all 60,000 images but plateaus at about 0.95 loss and roughly 70% accuracy after 30 epochs. Training and validation losses track each other closely, indicating the model lacks the capacity to learn the full pattern rather than memorizing data. The loss values are compared against random guessing and a larger 50-neuron model to show how much learning actually occurs. The article frames these results as a baseline for understanding when a model is too small rather than overfitted.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in