Multilayer Perceptron in Python 3