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

Method build_graph

tensorflow/python/kernel_tests/cond_v2_test.py:306–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304 def run_test(pred_value):
305
306 def build_graph():
307 pred = array_ops.placeholder(dtypes.bool, name="pred")
308 x = constant_op.constant(1.0, name="x")
309 y = constant_op.constant(2.0, name="y")
310
311 def true_fn():
312 return 2.0
313
314 def false_fn():
315
316 def false_true_fn():
317 return x * y * 2.0
318
319 def false_false_fn():
320 return x * 5.0
321
322 return _cond(pred, false_true_fn, false_false_fn, "inside_false_fn")
323
324 return x, y, pred, true_fn, false_fn
325
326 with ops.Graph().as_default():
327 x, y, pred, true_fn, false_fn = build_graph()

Callers 1

_VerifyBuildGraphMethod · 0.80

Calls 3

fnFunction · 0.50
placeholderMethod · 0.45
constantMethod · 0.45

Tested by

no test coverage detected