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

Method loop_body

tensorflow/python/kernel_tests/cond_v2_test.py:1052–1061  ·  view source on GitHub ↗
(i, output)

Source from the content-addressed store, hash-verified

1050 output = tensor_array_ops.TensorArray(dtype=dtypes.int32, size=x.shape[0])
1051
1052 def loop_body(i, output):
1053
1054 def if_true():
1055 return output.write(i, x[i]**2)
1056
1057 def if_false():
1058 return output.write(i, x[i])
1059
1060 output = control_flow_ops.cond(x[i] > 0, if_true, if_false)
1061 return i + 1, output
1062
1063 _, output = control_flow_ops.while_loop(
1064 lambda i, arr: i < x.shape[0],

Callers

nothing calls this directly

Calls 1

condMethod · 0.45

Tested by

no test coverage detected