TensorFlow and training performance