Please note this is not my work this is the work of Charles Fried, link below, but I felt like sharing it, as there aren’t many working examples of neural networks in processing, and this one comes with great explanations and annotations. Also this was posted on a public resource available to all by the original author.
Here is the link to part4 of the files on my github. Note part 4 contains all other parts.