tf.contrib.framework.smart_constant_value(pred)
Defined in tensorflow/python/framework/smart_cond.py
.
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
: Ifpred
is not a Tensor or bool.