June 11, 2022, 12:07 p.m. | Rohith ND

DEV Community dev.to

In this blog, I'll show you how to train a neural network model using the MNIST dataset, as well as how to predict the digits in them using images.


Make sure you have the Tensorflow package installed, as it will be utilised as a Deep Learning library here.


Let's import all packages which are necessary for us



import os  
import cv2
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np


After we've imported all of the essential …

cnn deeplearning machinelearning mnist prediction tensorflow

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Consultant - Artificial Intelligence & Data (Google Cloud Data Engineer) - MY / TH

@ Deloitte | Kuala Lumpur, MY