(self)
| 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(): |
no test coverage detected