Lab Subject

The MNIST dataset is provided by the National Institute of Standards and Technology (NIST).

The dataset consists of handwritten digits from 250 individuals, of which 50% are high school students and 50% are staff from Bureau of the Census.

The MNIST dataset consists of the following parts:

    - Training set images: 60,000 samples

    - Training set labels: 60,000 labels

    - Test set images: 10,000 samples

    - Test set labels: 10,000 labels

The MNIST dataset is an entry-level computer vision dataset that contains images of various handwritten digits.

It also contains one label for each image, to clarify the correct digit. For example, the labels for the preceding four images are 5, 0, 4, and 1.

Useful instructions:

  • To load the dataset, use 
    datasets.mnist.load_data() 
  • Each image is 28 x 28 (no RGB channels here)
  • To convert a 28 x 28 image into a 784 x 1 vector, use

    x_train = x_train_raw.reshape(60000, 784)
    x_test = x_test_raw.reshape(10000, 784)

Outline

Covered experiments

  1. Discovering Google colab https://colab.research.google.com/
  2. Creation of a DNN (Deep Neural Network) model:
    • At least 3 hidden layers (you could use more, try to increase or decrease the number of neurons) + 1 output layer ;
    • Use Adam optimizer with a learning rate of 0.01 (and repeat the training with 0.001) (experiment with other optimizers);
    • Train, evaluate and save the model, then test.
  3. Creation of a CNN model:
    • Try to be creative (you may use dropout before flattening for example)
    • Experiment !!
Last modified: Thursday, 17 March 2022, 2:52 PM