tf.contrib.bayesflow.stochastic_tensor.ObservedStochasticTensor

class tf.contrib.bayesflow.stochastic_tensor.ObservedStochasticTensor

Defined in tensorflow/contrib/bayesflow/python/ops/stochastic_tensor_impl.py.

A StochasticTensor with an observed value.

Properties

distribution

dtype

graph

name

value_type

Methods

__init__

__init__(
    dist,
    value,
    name=None
)

Construct an ObservedStochasticTensor.

ObservedStochasticTensor is backed by distribution dist and uses the provided value instead of using the current value type to draw a value from the distribution. The provided value argument must be appropriately shaped to have come from the distribution.

Args:

  • dist: an instance of Distribution.
  • value: a Tensor containing the observed value
  • name: a name for this ObservedStochasticTensor and its ops.

Raises:

  • TypeError: if dist is not an instance of Distribution.
  • ValueError: if value is not compatible with the distribution.

entropy

entropy(name='entropy')

loss

loss(
    final_loss,
    name=None
)

mean

mean(name='mean')

value

value(name='value')