Front trainning  neural network with brain.js. The image is adapted from https://github.com/BrainJS/brain.js.