Building the TensorFlow model