1

I have TensorFlow 2.6 installed with Python 3.9. However, I get the following errors:

tf.enable_eager_execution()

AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'

When I run tf.executing_eagerly() I get False.

I reinstalled TensorFlow and I'm still getting the same errors.

Marat
  • 15,215
  • 2
  • 39
  • 48
Steve
  • 129
  • 1
  • 14

1 Answers1

1

In TensorFlow 2 and above, eager execution should be already enabled by default. You can check that with tf.executing_eagerly(). Only use tf.enable_eager_execution() if running a version of Tensorflow before 2.0

shreyasm-dev
  • 2,711
  • 5
  • 16
  • 34