After reading over this (https://brilliant.org/wiki/backpropagation) many times I’ve finally got training working for the last layer. It shouldn’t be too hard to extend that to the rest.
I’m currently using a very naive approach of looping over data, so after training is working I’ll simplify the code a lot by making use of matrices.
I’ve attached the code for training a very simple network, it has one layer with one input and two outputs. It should’ve predicted [0.3, 0.25], so pretty close.
Log in to leave a comment