First implementation of neural network