Skip to content

chetlasrijith/NeuralNetworks_FromScratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Neural Network From Scratch – MNIST Digit Recognizer

License

This project implements a Neural Network from scratch in Python using only NumPy to recognize handwritten digits from the MNIST dataset. It’s an educational project designed to understand how neural networks work internally without relying on high-level libraries like TensorFlow or PyTorch.


πŸš€ Features

βœ… Builds a neural network from scratch (no external ML frameworks)
βœ… Implements forward propagation and backpropagation
βœ… Uses ReLU and Softmax activations
βœ… Trains on the MNIST dataset
βœ… Achieves ~85% accuracy on the development set
βœ… Visualizes predictions for test images


πŸ› οΈ Tech Stack

  • Language: Python 🐍
  • Libraries: NumPy, Pandas, Matplotlib
  • Dataset: MNIST (handwritten digits)

πŸ“₯ Installation

1️⃣ Clone the repository

git clone https://github.com/chetlasrijith/neural-net-mnist.git
cd neural-net-mnist

2️⃣ Install dependencies

pip install numpy pandas matplotlib

3️⃣ Add Dataset

  • Download the MNIST training dataset (mnist_train.csv) from Kaggle or any other source.
  • Place the file in the datasets/ folder.

πŸ§‘β€πŸ’» How It Works

  1. Data Loading: Loads mnist_train.csv, normalizes pixel values (0-1).

  2. Network Architecture:

    • Input layer: 784 neurons (28x28 pixels)
    • Hidden layer: 10 neurons with ReLU activation
    • Output layer: 10 neurons with Softmax activation
  3. Training:

    • Uses forward propagation to compute predictions.
    • Applies backpropagation to update weights and biases.
    • Trains over multiple iterations (epochs).
  4. Prediction:

    • Predicts the digit for unseen images and visualizes them using Matplotlib.

πŸ“Š Results

Metric Value
Training Accuracy 85%
Test Accuracy ~84-85%

🀝 Contributing

Contributions are welcome! Follow these steps:

  1. Fork the repo
  2. Create your branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

πŸ“ž Contact

Created with ❀️ by Chetla Srijith For queries, raise an issue in the repository or connect on LinkedIn.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors