View source on GitHub
  
 | 
Raised when an unsupported operator is present in Graph execution.
tf.errors.OperatorNotAllowedInGraphError(
    *args, **kwargs
)
For example, using a tf.Tensor as a Python bool inside a Graph will
raise OperatorNotAllowedInGraphError. Iterating over values inside a
tf.Tensor is also not supported in Graph execution.
Example:
@tf.functiondef iterate_over(t):a,b,c = treturn aiterate_over(tf.constant([1, 2, 3]))Traceback (most recent call last):OperatorNotAllowedInGraphError: ...
    View source on GitHub