Implementation of neural network