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

Function default_action

tensorflow/python/ops/control_flow_ops.py:3055–3066  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3053 other_predicates, other_actions = predicates[:k], actions[:k]
3054
3055 def default_action():
3056 others_msg = ("Implementation error: "
3057 "selected default action #%d was called, but some of other "
3058 "predicates are True: " % k)
3059 default_msg = ("Input error: "
3060 "None of conditions evaluated as True:",
3061 array_ops.stack(predicates, name="preds_c"))
3062 with ops.control_dependencies([
3063 _assert_at_most_n_true(other_predicates, n=0, msg=others_msg),
3064 Assert(predicate, data=default_msg)
3065 ]):
3066 return action()
3067
3068 return default_action, other_predicates, other_actions
3069

Callers

nothing calls this directly

Calls 4

_assert_at_most_n_trueFunction · 0.85
AssertFunction · 0.70
stackMethod · 0.45
control_dependenciesMethod · 0.45

Tested by

no test coverage detected