Hands On: Achieving 99%
In the beginning of Part II, we set a target for ourselves: 99% accuracy on MNIST. We just got so close, reaching 98.6%. That last 0.4%? That’s up to you.
I told you that configuring a network can be more art than science, and this Hands On is proof of that. Here’s my suggestion: to find better hyperparameters than the ones we have now, drop compare.py. Instead, use neural_network_quieter.py, an alternative version of the network that logs accuracy only once every 10 epochs—it’s much faster. Here are a few things that you can try:
-
The standardized version of MNIST generally works better. There’s no reason not to use it.
-
Sometimes, it pays off to be patient and wait for more epochs before giving up. However, if 20 or ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access