tf.contrib.framework.smart_constant_value
Return the bool value for pred
, or None if pred
had a dynamic value.
tf.contrib.framework.smart_constant_value( pred )
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. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/framework/smart_constant_value