tf.test.assert_equal_graph_def()

tf.test.assert_equal_graph_def(actual, expected) Asserts that two GraphDefs are (mostly) the same. Compares two GraphDef protos for equality, ignoring versions and ordering of nodes, attrs, and control inputs. Node names are used to match up nodes between the graphs, so the naming of nodes must be consistent. Args: actual: The GraphDef we have. expected: The GraphDef we expected. Raises: AssertionError: If the GraphDefs do not match. TypeError: If either argument is not a GraphDef.

tf.contrib.learn.BaseEstimator

class tf.contrib.learn.BaseEstimator Abstract BaseEstimator class to train and evaluate TensorFlow models. Concrete implementation of this class should provide the following functions: _get_train_ops _get_eval_ops _get_predict_ops Estimator implemented below is a good example of how to use this class.

tf.contrib.distributions.TransformedDistribution.log_prob()

tf.contrib.distributions.TransformedDistribution.log_prob(value, name='log_prob') Log probability density/mass function (depending on is_continuous). Additional documentation from TransformedDistribution: Implements (log o p o g)(y) - (log o det o J o g)(y), where g is the inverse of transform. Also raises a ValueError if inverse was not provided to the distribution and y was not returned from sample. Args: value: float or double Tensor. name: The name to give this op. Returns: log_prob:

tf.contrib.distributions.BetaWithSoftplusAB.log_cdf()

tf.contrib.distributions.BetaWithSoftplusAB.log_cdf(value, name='log_cdf') Log cumulative distribution function. Given random variable X, the cumulative distribution function cdf is: log_cdf(x) := Log[ P[X <= x] ] Often, a numerical approximation can be used for log_cdf(x) that yields a more accurate answer than simply taking the logarithm of the cdf when x << -1. Additional documentation from Beta: Note that the argument x must be a non-negative floating point tensor whose shape can

tf.cholesky()

tf.cholesky(input, name=None) Computes the Cholesky decomposition of one or more square matrices. The input is a tensor of shape [..., M, M] whose inner-most 2 dimensions form square matrices, with the same constraints as the single matrix Cholesky decomposition above. The output is a tensor of the same shape as the input containing the Cholesky decompositions for all input submatrices [..., :, :]. Args: input: A Tensor. Must be one of the following types: float64, float32. Shape is [..., M,

tf.contrib.distributions.ExponentialWithSoftplusLam.mode()

tf.contrib.distributions.ExponentialWithSoftplusLam.mode(name='mode') Mode. Additional documentation from Gamma: The mode of a gamma distribution is (alpha - 1) / beta when alpha > 1, and NaN otherwise. If self.allow_nan_stats is False, an exception will be raised rather than returning NaN.

tf.nn.rnn_cell.LSTMCell.zero_state()

tf.nn.rnn_cell.LSTMCell.zero_state(batch_size, dtype) Return zero-filled state tensor(s). Args: batch_size: int, float, or unit Tensor representing the batch size. dtype: the data type to use for the state. Returns: If state_size is an int or TensorShape, then the return value is a N-D tensor of shape [batch_size x state_size] filled with zeros. If state_size is a nested list or tuple, then the return value is a nested list or tuple (of the same structure) of 2-D tensors with the shapes [b

tf.contrib.distributions.Beta.param_static_shapes()

tf.contrib.distributions.Beta.param_static_shapes(cls, sample_shape) param_shapes with static (i.e. TensorShape) shapes. Args: sample_shape: TensorShape or python list/tuple. Desired shape of a call to sample(). Returns: dict of parameter name to TensorShape. Raises: ValueError: if sample_shape is a TensorShape and is not fully defined.

tf.contrib.distributions.TransformedDistribution.param_shapes()

tf.contrib.distributions.TransformedDistribution.param_shapes(cls, sample_shape, name='DistributionParamShapes') Shapes of parameters given the desired shape of a call to sample(). Subclasses should override static method _param_shapes. Args: sample_shape: Tensor or python list/tuple. Desired shape of a call to sample(). name: name to prepend ops with. Returns: dict of parameter name to Tensor shapes.

tf.contrib.distributions.QuantizedDistribution.prob()

tf.contrib.distributions.QuantizedDistribution.prob(value, name='prob') Probability density/mass function (depending on is_continuous). Additional documentation from QuantizedDistribution: For whole numbers y, P[Y = y] := P[X <= lower_cutoff], if y == lower_cutoff, := P[X > upper_cutoff - 1], y == upper_cutoff, := 0, if j < lower_cutoff or y > upper_cutoff, := P[y - 1 < X <= y], all other y. The base distribution's cdf method must be defined on