Skip to content

About

This project implements a feedforward neural network from scratch in C++ using the Eigen library to classify handwritten digits from the MNIST dataset using ReLU activation, and an output layer with 10 neurons using softmax. It is trained using cross-entropy loss and mini-batch gradient descent, with manual forward and backpropagation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Neural-Network in C++

This is a basic neural network built entirely from scratch in C++ to recognize handwritten digits using the MNIST dataset.

It uses:

  • 🧮 Eigen library for matrix operations
  • 3 layers:
    • Input layer: 784 neurons
    • Hidden layers: 128 → 64 (with ReLU)
    • Output layer: 10 neurons (with Softmax)
  • 📉 Cross-entropy loss
  • 🔁 Mini-batch gradient descent
  • ✅ Accuracy and confusion matrix evaluation

🔧 How to Use

  1. Run the preprocessing script to generate CSV files:
    python preprocessing.py

About

This project implements a feedforward neural network from scratch in C++ using the Eigen library to classify handwritten digits from the MNIST dataset using ReLU activation, and an output layer with 10 neurons using softmax. It is trained using cross-entropy loss and mini-batch gradient descent, with manual forward and backpropagation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages