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

Method fn_with_cond

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

Source from the content-addressed store, hash-verified

671
672 @def_function.function
673 def fn_with_cond():
674 cond_v2.cond_v2(
675 constant_op.constant(True),
676 lambda: array_ops.zeros([]),
677 lambda: array_ops.ones([]),
678 name="cond_1")
679 return cond_v2.cond_v2(
680 constant_op.constant(False),
681 lambda: array_ops.zeros([]),
682 lambda: array_ops.ones([]),
683 name="cond_2")
684
685 concrete_fn = fn_with_cond.get_concrete_function()
686 cond_1 = concrete_fn.graph.get_operation_by_name("cond_1")

Callers

nothing calls this directly

Calls 4

onesMethod · 0.80
gradientMethod · 0.80
constantMethod · 0.45
GradientTapeMethod · 0.45

Tested by

no test coverage detected