Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eager execution mode is disable in newer tf-gpu version #2838

Open
nikhilcms opened this issue Jun 26, 2023 · 0 comments
Open

Eager execution mode is disable in newer tf-gpu version #2838

nikhilcms opened this issue Jun 26, 2023 · 0 comments

Comments

@nikhilcms
Copy link

nikhilcms commented Jun 26, 2023

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): linux
  • TensorFlow version and how it was installed (source or binary): 3.18
  • TensorFlow-Addons version and how it was installed (source or binary): binary
  • Python version: 3.8.1
  • Is GPU used? (yes/no): yes

Describe the bug

I am running tensorflow training code inside docker container, for this I am using tensorflow/tensorflow:2.9.2-gpu image as base image and install tensorflow-addons==0.18.0, but as I interpreting correctly recent tensorflow-gpu not support enable eager execution mode that why I am not able to run tfa.image.random_cutout method.

while running image = tfa.image.random_cutout(tf.expand_dims(image, axis=0), mask_size=10, constant_values=0) line
code throw below error while execustion of if tf.rank(mask_size) == 0: line:

OperatorNotAllowedInGraphError: Using a symbolic tf.Tensor as a Python bool is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function.

this error basically tell us to run above code with enable eager execution code, I have tried tf.compat.v1.enable_eager_execution() and tf.config.run_functions_eagerly(True) to enagle eager execution model but still tf.executing_eagerly() showing False

Is there any way to run tfa.image.random_cutout code with tf.executing_eagerly()=False mode ?
please let me know if you need any other information.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant