tf.contrib.crf.crf_log_likelihood()

tf.contrib.crf.crf_log_likelihood(inputs, tag_indices, sequence_lengths, transition_params=None) Computes the log-likehood of tag sequences in a CRF. Args: inputs: A [batch_size, max_seq_len, num_tags] tensor of unary potentials to use as input to the CRF layer. tag_indices: A [batch_size, max_seq_len] matrix of tag indices for which we compute the log-likehood. sequence_lengths: A [batch_size] vector of true sequence lengths. transition_params: A [num_tags, num_tags] transition matrix, if

tf.contrib.distributions.Binomial.__init__()

tf.contrib.distributions.Binomial.__init__(n, logits=None, p=None, validate_args=False, allow_nan_stats=True, name='Binomial') Initialize a batch of Binomial distributions. Args: n: Non-negative floating point tensor with shape broadcastable to [N1,..., Nm] with m >= 0 and the same dtype as p or logits. Defines this as a batch of N1 x ... x Nm different Binomial distributions. Its components should be equal to integer values. logits: Floating point tensor representing the log-odds of a po

tf.contrib.distributions.Categorical.sample()

tf.contrib.distributions.Categorical.sample(sample_shape=(), seed=None, name='sample') Generate samples of the specified shape. Note that a call to sample() without arguments will generate a single sample. Args: sample_shape: 0D or 1D int32 Tensor. Shape of the generated samples. seed: Python integer seed for RNG name: name to give to the op. Returns: samples: a Tensor with prepended dimensions sample_shape.

tf.ifft2d()

tf.ifft2d(input, name=None) Compute the inverse 2-dimensional discrete Fourier Transform over the inner-most 2 dimensions of input. Args: input: A Tensor of type complex64. A complex64 tensor. name: A name for the operation (optional). Returns: A Tensor of type complex64. A complex64 tensor of the same shape as input. The inner-most 2 dimensions of input are replaced with their inverse 2D Fourier Transform.

tf.contrib.bayesflow.stochastic_tensor.SampleValue.__init__()

tf.contrib.bayesflow.stochastic_tensor.SampleValue.__init__(n=1, stop_gradient=False) Sample n times and concatenate along a new outer dimension. Args: n: A python integer or int32 tensor. The number of samples to take. stop_gradient: If True, StochasticTensors' values are wrapped in stop_gradient, to avoid backpropagation through.

tf.contrib.bayesflow.monte_carlo.expectation()

tf.contrib.bayesflow.monte_carlo.expectation(f, p, z=None, n=None, seed=None, name='expectation') Monte Carlo estimate of an expectation: E_p[f(Z)] with sample mean. This Op returns n^{-1} sum_{i=1}^n f(z_i), where z_i ~ p \approx E_p[f(Z)] User supplies either Tensor of samples z, or number of samples to draw n Args: f: Callable mapping samples from p to Tensors. p: tf.contrib.distributions.BaseDistribution. z: Tensor of samples from p, produced by p.sample_n. n: Integer Tensor. Number

tf.contrib.ffmpeg.encode_audio()

tf.contrib.ffmpeg.encode_audio(audio, file_format=None, samples_per_second=None) Creates an op that encodes an audio file using sampled audio from a tensor. Args: audio: A rank 2 tensor that has time along dimension 0 and channels along dimension 1. Dimension 0 is samples_per_second * length long in seconds. file_format: The type of file to encode. "wav" is the only supported format. samples_per_second: The number of samples in the audio tensor per second of audio. Returns: A scalar tenso

tf.contrib.framework.model_variable()

tf.contrib.framework.model_variable(*args, **kwargs) Gets an existing model variable with these parameters or creates a new one. Args: name: the name of the new or existing variable. shape: shape of the new or existing variable. dtype: type of the new or existing variable (defaults to DT_FLOAT). initializer: initializer for the variable if one is created. regularizer: a (Tensor -> Tensor or None) function; the result of applying it on a newly created variable will be added to the colle

tf.contrib.distributions.TransformedDistribution.log_survival_function()

tf.contrib.distributions.TransformedDistribution.log_survival_function(value, name='log_survival_function') Log survival function. Given random variable X, the survival function is defined: log_survival_function(x) = Log[ P[X > x] ] = Log[ 1 - P[X <= x] ] = Log[ 1 - cdf(x) ] Typically, different numerical approximations can be used for the log survival function, which are more accurate than 1 - cdf(x) when x >> 1. Args: value: flo

tf.contrib.framework.get_model_variables()

tf.contrib.framework.get_model_variables(scope=None, suffix=None) Gets the list of model variables, filtered by scope and/or suffix. Args: scope: an optional scope for filtering the variables to return. suffix: an optional suffix for filtering the variables to return. Returns: a list of variables in collection with scope and suffix.