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

Function loop_fn

tensorflow/python/ops/parallel_for/gradients_test.py:177–178  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

175 return gradient_ops.gradients(activation, variables.trainable_variables())
176
177 def loop_fn(i):
178 return model_fn(array_ops.expand_dims(array_ops.gather(inp, i), 0))
179
180 pfor_outputs = control_flow_ops.pfor(loop_fn, batch_size)
181 loop_fn_dtypes = [x.dtype for x in variables.trainable_variables()]

Callers

nothing calls this directly

Calls 7

modelFunction · 0.85
reshapeMethod · 0.80
jacobianMethod · 0.80
model_fnFunction · 0.70
expand_dimsMethod · 0.45
gatherMethod · 0.45
trainable_variablesMethod · 0.45

Tested by

no test coverage detected