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.
System information
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 Pythonbool
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