Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noahfeldt/ann-from-scratch
Implementation of a multi layer perceptron artificial neural network from scratch that is tested using the MNIST dataset.
https://github.com/noahfeldt/ann-from-scratch
artificial-intelligence artificial-neural-networks image-classification machine-learning ml mlp mlp-classifier mnist mnist-classification mnist-dataset mnist-handwriting-recognition multi-layer-perceptron neural-network nn numpy python reinforcement-learning
Last synced: about 1 month ago
JSON representation
Implementation of a multi layer perceptron artificial neural network from scratch that is tested using the MNIST dataset.
- Host: GitHub
- URL: https://github.com/noahfeldt/ann-from-scratch
- Owner: NoahFeldt
- License: mit
- Created: 2023-08-13T17:06:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-28T19:14:45.000Z (about 1 year ago)
- Last Synced: 2024-01-26T09:16:56.879Z (11 months ago)
- Topics: artificial-intelligence, artificial-neural-networks, image-classification, machine-learning, ml, mlp, mlp-classifier, mnist, mnist-classification, mnist-dataset, mnist-handwriting-recognition, multi-layer-perceptron, neural-network, nn, numpy, python, reinforcement-learning
- Language: Python
- Homepage:
- Size: 380 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ANN-From-Scratch
Implementation of a multi layer perceptron artificial neural network from scratch that is tested using the MNIST dataset.## Prerequisites
The [NumPy](https://github.com/numpy/numpy) module is used for numerical vector and matrix calculations:
```bash
pip install numpy
```The [Keras](https://github.com/keras-team/keras) module is used to import the MNIST dataset:
```bash
pip install keras
```The [tqdm](https://github.com/tqdm/tqdm) module is used for creating the progress bar:
```bash
pip install tqdm
```## Design choices
The neural network implementation uses the following design choices:
* Sigmoid activation function.
* Xavier Glorot initialization of the weights.
* Zero initialization of the biases.
* Mean squared error cost function.
## Usage
The neural network implementation, can be found in the `ann.py` module where the `NeuralNetwork` class exists.
To test the neural network on the MNIST dataset, run the `mnist.py` file. This script will train and test a neural network with the given parameters.
## Results
The neural network reaches an accuracy of about 90.5 % on MNIST dataset with the parameters used in the `mnist.py` file.