Skip to content

YzdnByat/MNIST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST Classification with Neural Networks

Grad-CAM visualization

This repository contains two implementations of neural networks for handwritten digit classification on the MNIST dataset using PyTorch.
The project compares a fully connected baseline (MLP) with a convolutional neural network (CNN) to highlight the advantages of convolutional architectures for image tasks.


Results

  • MLP (Multi-Layer Perceptron): ~97% test accuracy.
  • CNN (Convolutional Neural Network): ~99% test accuracy.
  • Training and validation curves show significant generalization improvement with CNNs.

Features

  • Data preprocessing and normalization using torchvision.
  • Two separate implementations: MLP (dense layers) and CNN (convolutions + pooling).
  • Training pipeline with Adam optimizer and cross-entropy loss.
  • Evaluation using accuracy and confusion matrices.
  • Modular Jupyter notebooks for interactive exploration.

Repository Structure

About

MNIST-Classification

Resources

Stars

Watchers

Forks