Tutorial to become familiar with the deep learning frameworks — Part 1. MNIST

Source: Deep Learning on Medium

[TF vs. PyTorch] MNIST tutorial

Figure 1. Sample images from MNIST

MNIST is the set of data for training the machine to learn handwritten numeral images, which is the most popular and appropriate subject for the purpose of entering deep learning.

Through this post, piece of codes with explanation will be provided and full codes are upload on the following links;

Also, this post is written with reference to the following sources;

Tensorflow version

EDA (exploratory data analysis)

In order to train a deep learning model, the first thing to do is to explore and analyze the given dataset. The things we have to check through EDA are following;

  • Check size and shape of feature data and label data
Load MNIST dataset and check size and shape
  • Check the distribution of label data
Distribution of label dataset
  • (Optional) Check the real image of feature data
Sample image of feature data

Data preprocess



Train & Evaluate

Pytorch version


Data preprocess


Train & Evaluate