tf.contrib.distributions.Dirichlet.__init__()

tf.contrib.distributions.Dirichlet.__init__(alpha, validate_args=False, allow_nan_stats=True, name='Dirichlet')

Initialize a batch of Dirichlet distributions.

Args:
  • alpha: Positive floating point tensor with shape broadcastable to [N1,..., Nm, k] m >= 0. Defines this as a batch of N1 x ... x Nm different k class Dirichlet distributions.
  • validate_args: Boolean, default False. Whether to assert valid values for parameters alpha and x in prob and log_prob. If False, correct behavior is not guaranteed.
  • allow_nan_stats: Boolean, default True. If False, raise an exception if a statistic (e.g. mean/mode/etc...) is undefined for any batch member. If True, batch members with valid parameters leading to undefined statistics will return NaN for this statistic.
  • name: The name to prefix Ops created by this distribution class.

  • Examples:

# Define 1-batch of 2-class Dirichlet distributions,
# also known as a Beta distribution.
dist = Dirichlet([1.1, 2.0])

# Define a 2-batch of 3-class distributions.
dist = Dirichlet([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]])
doc_TensorFlow
2016-10-14 12:50:25
Comments
Leave a Comment

Please login to continue.