tf.contrib.bayesflow.stochastic_tensor.value_type(dist_value_type)
Creates a value type context for any StochasticTensor created within.
Typical usage:
with sg.value_type(sg.MeanValue(stop_gradients=True)):
dt = sg.DistributionTensor(distributions.Normal, mu=mu, sigma=sigma)
In the example above, dt.value() (or equivalently, tf.identity(dt)) will be the mean value of the Normal distribution, i.e., mu (possibly broadcasted to the shape of sigma). Furthermore, because the MeanValue was marked