Lets look at the first ten training images. The training set consists of 60,000 28x28 pixel images, and the test set 10,000. Let's load the data: (train_images, train_labels), (test_images, test_labels) = mnist. You can see a full list of datasets Keras has packaged up. Since working with the MNIST digits is so common, Keras provides a function to load the data. If you would like to follow along, the code is also available in a jupyter notebook here. I highly recommend reading the book if you would like to dig deeper or learn more. Much of this is inspired by the book Deep Learning with Python by François Chollet. In this post we'll use Keras to build the hello world of machine learning, classify a number in an image from the MNIST database of handwritten digits, and achieve ~99% classification accuracy using a convolutional neural network.
0 Comments
Leave a Reply. |