I get the following error:
OperatorNotAllowedInGraphError: using a tf.Tensor
as a Python bool
is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function.
when running the code:
in convolutional_model(input_shape)
42 Z1 = tf.keras.layers.Conv2D(8,(4,4),strides=1,padding=‘SAME’)(input_img)
43 ## RELU
—> 44 A1 = tf.keras.layers.ReLU(Z1)
Looks like the output of Conv2D layer Z1 cannot be evaluated in ReLU function.
Any help how to overcome this problem?