tfp.experimental.distributions.marginal_fns.ps.smart_where
As tf.where, but only calls x_fn/y_fn when condition not statically known.
tfp.experimental.distributions.marginal_fns.ps.smart_where(
condition, x_fn, y_fn
)
Args |
condition
|
A bool Tensor.
|
x_fn
|
A callable returning a Tensor , for locations where condition is
True .
|
y_fn
|
A callable returning a Tensor , for locations where condition is
False .
|
Returns |
A Tensor equivalent to tf.where(condition, x_fn(), y_fn()) .
|
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 2023-11-21 UTC.
[null,null,["Last updated 2023-11-21 UTC."],[],[]]