Next step is ramdom and equal. I also need to have a look at add and the serial naming of the functions.
Fixed the loss functions for categories and is ready for accuracy calculation on page 129