MNIST Handwritten Numbers

Hello World and the MNIST Database

Hello World and the MNIST Database | Blog

Hello World and the MNIST Database

Interestingly, the MNIST data is actually a modified set of an older database of handwritten numbers made up of 60,000 from the United States Census Bureau and 10,000 from American high school students. The original data was modified so that half the training data and half the test data came from both sources.

Getting this test running was my first step into doing something with this machine learning/deep learning info I’ve been reading so much about of late. It was a relatively simple test, it took longer to get my laptop up and running to run through the test, and it will probably take longer to write the blog post than it did to do the actual test.

mnist-examples

Building blocks

I have a couple of laptops available to me, but for the power/weight argument, I’m a big fan of the Lenovo Thinkpad X1 Carbon, it doesn’t have an NVIDIA GPU but in all other senses, it is a pretty decent machine, especially running Ubuntu 18.04.

On the laptop I’m running:

  • Python 2.7
  • Pip
  • Keras
  • Bazel
  • TensorFlow

Getting Bazel to install was the only challenge really, and in my case, I think it was a quirk of the way in which I’ve built my laptop and how I manage permissions using something called JumpCloud. This was solved by giving execute rights to a couple of the directories and running sudo with the -H flag.

I think these oddities were as a result of my own specific setup as I didn’t find too many others with similar problems, although tackling each separate error I came across did lead me to a trove of useful websites across the web. If you do have similar issues, let me know and I’ll provide more info.

mnist-test-1