Using tensorflow and Keras to do the object recognition based on the MNIST data
ID: 3844130 • Letter: U
Question
Using tensorflow and Keras to do the object recognition based on the MNIST data set. About the MNIST data set The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. It is a subset of a larger set available from NIST. The digits have been size-normalized and centered in a fixed-size image. More introduction of this data set is given below: http://yann.lecun.com/exdb/mnist/ ###################################################################### Project part 1: Using single layer deep learning network to do the object recognition(getting the accuracy )
Please submit the code, the result of your code(if the code is run from the terminal, pls send me the Screenshots of the result. If you run the code from the ipython notebook, please provide the result in your submission of the code) and a brief read me file to explain your experiment and result
Software requirement: python3.5 package installation: please install: numpy,tensorflow,keras, More about how to use Keras: https://keras.io/getting-started/sequential-model-guide/
Explanation / Answer
from keras.datasets import mnist
import matplotlib.pyplot as plt
# load (downloaded if needed) the MNIST dataset
(X_train, y_train), (X_test, y_test) = mnist.load_data()
# plot 4 images as gray scale
plt.subplot(221)
plt.imshow(X_train[0], cmap=plt.get_cmap('gray'))
plt.subplot(222)
plt.imshow(X_train[1], cmap=plt.get_cmap('gray'))
plt.subplot(223)
plt.imshow(X_train[2], cmap=plt.get_cmap('gray'))
plt.subplot(224)
plt.imshow(X_train[3], cmap=plt.get_cmap('gray'))
# show the plot
plt.show()
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.