python version of neural network