Multilayer Perceptron with softmax written in Python