https://github.com/dnglokpor/csci390-lab-2
Class Project: contains a small autonomous Neural Network built on python Numpy and able, when fed JSON-input data, to run a forward propagation then a backpropagation on it. The backpropagation code is custom-built on the mathematical concepts. A side project explores NN validation as well on a different set of JSON data.
https://github.com/dnglokpor/csci390-lab-2
ai backpropagation numpy-arrays python
Last synced: 4 months ago
JSON representation
Class Project: contains a small autonomous Neural Network built on python Numpy and able, when fed JSON-input data, to run a forward propagation then a backpropagation on it. The backpropagation code is custom-built on the mathematical concepts. A side project explores NN validation as well on a different set of JSON data.
- Host: GitHub
- URL: https://github.com/dnglokpor/csci390-lab-2
- Owner: dnglokpor
- Created: 2020-07-17T19:12:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-03T19:40:15.000Z (over 4 years ago)
- Last Synced: 2025-01-03T15:45:09.285Z (6 months ago)
- Topics: ai, backpropagation, numpy-arrays, python
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSCI390-lab-2 assignment by Delwys Glokpor 7/17/2020
Contains a project that sets a mock neural network and performs basic NN operations on sets provided to it. The program in _BackProp.py_ read std input of , , and . It uses the data oulled from to to build a mimic neural network. It then uses data pulled from to train the network, using the backpopagation algorithm to generate errors and derivatives.
_BackProp.py_ python module on run expect . two possible :
- :
- build a model based on and use the inputs in to run a single forward propagation. Prints the outcome vector and check it against the expected outcome vector to produce an error estimate. Run a backpropagation and print out the error layer to layer on each weight.
- Tweak weights and report on errors.
- :
- build a network based on contents and use that model to run the input output pairs from .
- Perform a mimic training with 3/4 of the data, on batches of 32, forward propagating, backpropagating and updating weights after each batch to reduce error by a rate of .01. Report on the error changes throughout training.
- Uses the last 1/4 of the data as a validation set. Only forward propagate and error reporting. No tweaking weights as this is not training.(1) Written and tested on *Python 3.8.3*. Make sure to install external *Numpy* library.
(2) and paths must be passed in to the program through the console std input.
(3) and must follow a specific *.json* structure (see _CfgEx.json_ for reference).
(4) For quick verify test, `$ python3 BackProp.py verify CfgEx.json DataEx.json` to see the outcome of the NN compared to the expected outcome, the error on the outcome and the error on each weight of the NN.
(5) For quick run test, `$ python3 BackProp.py verify CfgTrain.json DataTrain.json` to see the progressive training and validation process showing you for each input outout pairs, error on estimate compared to expected outcome, and error on each weight.