Skip to content

JayF-cs/PyTorch-MNIST-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

PyTorch MNIST Image Classifier

A foundational deep learning project demonstrating a basic Convolutional Neural Network (CNN) implementation in PyTorch for classifying handwritten digits from the MNIST dataset.

This project is an excellent starting point for understanding core concepts of neural networks, data loading, model training, and evaluation in the PyTorch framework.

Key Features

  • Data Preparation: Loads the MNIST dataset and applies necessary normalization and tensor transformations.
  • CNN Architecture: Implements a simple, two-layer CNN followed by max-pooling and fully connected layers.
  • Training Loop: Includes a standard PyTorch training process using Adam optimization and Cross-Entropy Loss.
  • Evaluation: Calculates the final test accuracy on unseen data.
  • Visualization: Displays a sample test image with the model's prediction versus the actual label.

Requirements

To run this code, you'll need the following Python libraries:

  • torch (PyTorch)
  • torchvision (for datasets and transformations)
  • matplotlib
  • numpy

You can install them using pip:

pip install torch torchvision matplotlib numpy

About

First ML Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages