Handwritten digits recognition using TensorFlow

In this example, we are going to classify images using TensorFlow. More specifically, we are going to create a simple model (a softmax regression model) for learning and predicting handwritten digits in images using the MNIST dataset.

Softmax regression is a generalization of logistic regression we can use for multi-class classification. The MNIST dataset (http://yann.lecun.com/exdb/mnist/) contains a variety of handwritten digital images:

The mnist_tensorflow_save_model.py script creates the model for learning and predicting handwritten digits in images.

The main steps are shown as follows. ...

Get Mastering OpenCV 4 with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.