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

Function _py_for_stmt

tensorflow/python/autograph/operators/control_flow.py:342–351  ·  view source on GitHub ↗

Overload of for_stmt that executes a Python for loop.

(iter_, extra_test, body, get_state, set_state, init_vars)

Source from the content-addressed store, hash-verified

340
341
342def _py_for_stmt(iter_, extra_test, body, get_state, set_state, init_vars):
343 """Overload of for_stmt that executes a Python for loop."""
344 del get_state, set_state
345
346 state = init_vars
347 for target in iter_:
348 if extra_test is not None and not extra_test(*state):
349 break
350 state = body(target, *state)
351 return state
352
353
354def _known_len_tf_for_stmt(iter_, extra_test, body, get_state, set_state,

Callers 1

for_stmtFunction · 0.85

Calls 1

bodyFunction · 0.50

Tested by

no test coverage detected