I just tried to enable eager execution in my shell which is actually showing an error:
AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'
My Tensorflow version is 2.0
can anyone tell me why am I getting this...
Thanks in advance
Tensorflow 2.0
has eager_execution enabled by default and so there is no need for you to run tf.enable_eager_execution
. Only if your running versions below 2.0
should you enable eager execution
Eager execution is enabled by default in version 2.x You can check that by using
tf.executing_eagerly()
It should return True. If you are having version less then 2.0 then it can be enabled by using
tf.enable_eager_execution()
for tensorflow v1.x code, this will works:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
tf.enable_eager_execution()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With