Implementing feedforward neural networks with Keras and TensorFlow