tf.contrib.distributions.Bernoulli.entropy()

tf.contrib.distributions.Bernoulli.entropy(name='entropy') Shanon entropy in nats.

tf.contrib.distributions.Bernoulli.dtype

tf.contrib.distributions.Bernoulli.dtype The DType of Tensors handled by this Distribution.

tf.contrib.distributions.Bernoulli.cdf()

tf.contrib.distributions.Bernoulli.cdf(value, name='cdf') Cumulative distribution function. Given random variable X, the cumulative distribution function cdf is: cdf(x) := P[X <= x] Args: value: float or double Tensor. name: The name to give this op. Returns: cdf: a Tensor of shape sample_shape(x) + self.batch_shape with values of type self.dtype.

tf.contrib.distributions.Bernoulli.batch_shape()

tf.contrib.distributions.Bernoulli.batch_shape(name='batch_shape') Shape of a single sample from a single event index as a 1-D Tensor. The product of the dimensions of the batch_shape is the number of independent distributions of this kind the instance represents. Args: name: name to give to the op Returns: batch_shape: Tensor.

tf.contrib.distributions.Bernoulli.allow_nan_stats

tf.contrib.distributions.Bernoulli.allow_nan_stats Python boolean describing behavior when a stat is undefined. Stats return +/- infinity when it makes sense. E.g., the variance of a Cauchy distribution is infinity. However, sometimes the statistic is undefined, e.g., if a distribution's pdf does not achieve a maximum within the support of the distribution, the mode is undefined. If the mean is undefined, then by definition the variance is undefined. E.g. the mean for Student's T for df = 1 is

tf.contrib.distributions.Bernoulli

class tf.contrib.distributions.Bernoulli Bernoulli distribution. The Bernoulli distribution is parameterized by p, the probability of a positive event.

tf.contrib.distributions.BaseDistribution.sample_n()

tf.contrib.distributions.BaseDistribution.sample_n(n, seed=None, name='sample') Generate n samples. Args: n: Scalar Tensor of type int32 or int64, the number of observations to sample. seed: Python integer seed for RNG name: name to give to the op. Returns: samples: a Tensor with a prepended dimension (n,). Raises: TypeError: if n is not an integer type.

tf.contrib.distributions.BaseDistribution.log_prob()

tf.contrib.distributions.BaseDistribution.log_prob(value, name='log_prob') Log probability density/mass function (depending on is_continuous). Args: value: float or double Tensor. name: The name to give this op. Returns: log_prob: a Tensor of shape sample_shape(x) + self.batch_shape with values of type self.dtype.

tf.contrib.crf.crf_unary_score()

tf.contrib.crf.crf_unary_score(tag_indices, sequence_lengths, inputs) Computes the unary scores of tag sequences. Args: tag_indices: A [batch_size, max_seq_len] matrix of tag indices. sequence_lengths: A [batch_size] vector of true sequence lengths. inputs: A [batch_size, max_seq_len, num_tags] tensor of unary potentials. Returns: unary_scores: A [batch_size] vector of unary scores.

tf.contrib.crf.viterbi_decode()

tf.contrib.crf.viterbi_decode(score, transition_params) Decode the highest scoring sequence of tags outside of TensorFlow. This should only be used at test time. Args: score: A [seq_len, num_tags] matrix of unary potentials. transition_params: A [num_tags, num_tags] matrix of binary potentials. Returns: viterbi: A [seq_len] list of integers containing the highest scoring tag indicies. viterbi_score: A float containing the score for the viterbi sequence.