This script is a basic implementation of a Neural Network in Python using NumPy from scratch. It's designed to classify handwritten digits from the MNIST dataset.
- Loads the MNIST dataset from local files.
- Preprocesses the data (normalizes pixel values and one-hot encodes labels).
- Trains a neural network on the dataset using mini-batching, sigmoid activation and stochastic gradient descent.
- Evaluates the trained model's performance on a test set.
- Saves a plot of the model's accuracy over training epochs.
- Python 3
- NumPy
- Matplotlib
- Update
labels_file_pathandimages_file_pathwith your local paths to the MNIST dataset. - Run the script with Python:
python mnist_cnn.py.
- Console output of model accuracy every 10 epochs and final test accuracy.
- A 'accuracy.png' plot file showing model accuracy over epochs.