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

Function smart_constant_value

tensorflow/tensorflow/python/framework/smart_cond.py:62–90  ·  view source on GitHub ↗

Return the bool value for `pred`, or None if `pred` had a dynamic value. Arguments: pred: A scalar, either a Python bool or tensor. Returns: True or False if `pred` has a constant boolean value, None otherwise. Raises: TypeError: If `pred` is not a Tensor or bool.

(pred)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

smart_condFunction · 0.85

Calls 3

TypeErrorFunction · 0.85
typeFunction · 0.85
_as_tf_outputMethod · 0.45

Tested by

no test coverage detected