https://github.com/lbirkert/digit-recognition
[from-scratch] feed forward neural network that can recognize handwritten digets
https://github.com/lbirkert/digit-recognition
feedforward-neural-network machine-learning numpy python
Last synced: 10 months ago
JSON representation
[from-scratch] feed forward neural network that can recognize handwritten digets
- Host: GitHub
- URL: https://github.com/lbirkert/digit-recognition
- Owner: lbirkert
- License: mit
- Created: 2024-06-29T15:34:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-17T20:51:35.000Z (over 1 year ago)
- Last Synced: 2024-07-18T01:03:02.505Z (over 1 year ago)
- Topics: feedforward-neural-network, machine-learning, numpy, python
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`## digit-recognition ##`
This is my attempt to create a digit recognition
neural network from scratch (without machine learning
frameworks, only numpy + math).
----
`## Model info ##`
- It consists of one input layer (for the 28 * 28 grayscale
pixel values), 2 hidden layers (each with 10 nodes) and
one output layer (which corresponds which digit is the most likely).
- It uses relu activation layers for the hidden layers and
a softmax activation layer for the output layer.
- It uses the MSE as the loss function. The error in this case is the
model output subtracted by a one hot vector of the expected output.
- It uses standard backpropagation with a constant learning rate and
stochastic learning to update the weight matrix.
- The weights are initialized using a normal distribution, as described
in the research paper of Le Cun et al.
- I could get it accurate up to 96%.
- It is licensed under the MIT license.
----
`## Dependencies ##`
- numpy
- matplotlib
----
`## Training the model ##`
To start training pleas use `python3 main.py`.
This will initialize the model and start training. Periodically a matplotlib
window will be opened showing a sample of test images and the model prediction
to visualize the model's accuracy.
----
© 2024 Lucas Birkert - All Rights Reserved