This is a single layer neural network consists of 4 inputs __4 neurons__ (first is bias=1 & others is RGB color values) and one output __1 neuron__.
This neural net trains itself on 4 samples of (RGB) red & blue colors using signum & signum_derivative & dirac_delta functions to classify your inputed color to blue +1 or red -1.
You can view the source code on GitHub.
Here is the mathematical representation of the idea:
- Trainning data samples & Neural Network:
- Calculation of the output Y with signum function:
- The weight adaptation steps:
Screenshots of some tests:
Comments
Post a Comment