turn off eager execution tensorflow code example Example: tf disable eager execution import tensorflow as tf tf.compat.v1.disable_eager_execution()