MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _disallow_iteration

Method _disallow_iteration

tensorflow/python/framework/ops.py:536–543  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

534 self._disallow_in_graph_mode("using a `tf.Tensor` as a Python `bool`")
535
536 def _disallow_iteration(self):
537 if ag_ctx.control_status_ctx().status == ag_ctx.Status.DISABLED:
538 self._disallow_when_autograph_disabled("iterating over `tf.Tensor`")
539 elif ag_ctx.control_status_ctx().status == ag_ctx.Status.ENABLED:
540 self._disallow_when_autograph_enabled("iterating over `tf.Tensor`")
541 else:
542 # Default: V1-style Graph execution.
543 self._disallow_in_graph_mode("iterating over `tf.Tensor`")
544
545 def __iter__(self):
546 if not context.executing_eagerly():

Callers 1

__iter__Method · 0.95

Tested by

no test coverage detected