Attend the Women in ML Symposium on December 7 Register now

tfp.experimental.distributions.marginal_fns.ps.smart_where

Stay organized with collections Save and categorize content based on your preferences.

As tf.where, but only calls x_fn/y_fn when condition not statically known.

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.

A Tensor equivalent to tf.where(condition, x_fn(), y_fn()).