Shallow Neural Network Python