Tensorflow python code.