MCPcopy Create free account
hub / github.com/alibaba/nann / smart_cond

Function smart_cond

tensorflow/tensorflow/python/framework/smart_cond.py:27–59  ·  view source on GitHub ↗

Return either `true_fn()` if predicate `pred` is true else `false_fn()`. If `pred` is a bool or has a constant value, we return either `true_fn()` or `false_fn()`, otherwise we use `tf.cond` to dynamically route to both. Arguments: pred: A scalar determining whether to return the result

(pred, true_fn=None, false_fn=None, name=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

TypeErrorFunction · 0.85
smart_constant_valueFunction · 0.85
true_fnFunction · 0.85
condMethod · 0.45

Tested by

no test coverage detected