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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[]]