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

Function loop_fn

tensorflow/python/ops/parallel_for/control_flow_ops.py:386–388  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

384 ```
385 """
386 def loop_fn(i):
387 gathered_elems = nest.map_structure(lambda x: array_ops.gather(x, i), elems)
388 return fn(gathered_elems)
389 batch_size = array_ops.shape(nest.flatten(elems)[0])[0]
390 return pfor(loop_fn, batch_size)

Callers 3

while_bodyFunction · 0.70
_pfor_implFunction · 0.70
tiled_loop_fnFunction · 0.70

Calls 2

fnFunction · 0.50
gatherMethod · 0.45

Tested by

no test coverage detected