Skip to content

maxipalay/fully-connected-neural-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fully Connected Neural Network

A python implementation of a Fully Connected Neural Network from scratch using numpy.

results

Usage

  • run.py - Sample usage for the Neural Network on a noisy sine wave.
  • nn.py - Implementation of Fully Connected layer and Neural Network (NN) class

Running run.py will start a training on the noisy sine function.

Sample output

While training, metrics will print every 10th epoch. Sample output:

starting training...
epoch: 10, train RMSE: 3.052E-01, val RMSE: 2.993E-01
epoch: 20, train RMSE: 2.998E-01, val RMSE: 2.970E-01
epoch: 30, train RMSE: 3.000E-01, val RMSE: 2.941E-01
...

Two plots will be shown after the training finishes. An error vs. epochs plot and a predictions vs. ground truth plot. Samples are included in images/.

Attribution

The implemented algorithm is based on the book Tom M. Mitchell - Machine Learning. It explains neural networks and the backpropagation algorithm.

Note

This code was developed on another repository and was then ported to this one.