tf.contrib.bayesflow.stochastic_graph.surrogate_loss()

tf.contrib.bayesflow.stochastic_graph.surrogate_loss(sample_losses, stochastic_tensors=None, name='SurrogateLoss') Surrogate loss for stochastic graphs. This function will call loss_fn on each StochasticTensor upstream of sample_losses, passing the losses that it influenced. Note that currently surrogate_loss does not work with StochasticTensors instantiated in while_loops or other control structures. Args: sample_losses: a list or tuple of final losses. Each loss should be per example in the

tf.contrib.distributions.MultivariateNormalFull.sample()

tf.contrib.distributions.MultivariateNormalFull.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.image.rot90()

tf.image.rot90(image, k=1, name=None) Rotate an image counter-clockwise by 90 degrees. Args: image: A 3-D tensor of shape [height, width, channels]. k: A scalar integer. The number of times the image is rotated by 90 degrees. name: A name for this operation (optional). Returns: A rotated 3-D tensor of the same type and shape as image.

tf.nn.rnn_cell.InputProjectionWrapper.__init__()

tf.nn.rnn_cell.InputProjectionWrapper.__init__(cell, num_proj, input_size=None) Create a cell with input projection. Args: cell: an RNNCell, a projection of inputs is added before it. num_proj: Python integer. The dimension to project to. input_size: Deprecated and unused. Raises: TypeError: if cell is not an RNNCell.

tf.contrib.distributions.DirichletMultinomial.batch_shape()

tf.contrib.distributions.DirichletMultinomial.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.bayesflow.stochastic_tensor.SampleValue

class tf.contrib.bayesflow.stochastic_tensor.SampleValue Draw n samples along a new outer dimension. This ValueType draws n samples from StochasticTensors run within its context, increasing the rank by one along a new outer dimension. Example: mu = tf.zeros((2,3)) sigma = tf.ones((2, 3)) with sg.value_type(sg.SampleValue(n=4)): dt = sg.DistributionTensor( distributions.Normal, mu=mu, sigma=sigma) # draws 4 samples each with shape (2, 3) and concatenates assertEqual(dt.value().get_shape()

tf.sparse_segment_sqrt_n()

tf.sparse_segment_sqrt_n(data, indices, segment_ids, name=None) Computes the sum along sparse segments of a tensor divided by the sqrt of N. N is the size of the segment being reduced. Read the section on Segmentation for an explanation of segments. Args: data: A Tensor. Must be one of the following types: float32, float64. indices: A Tensor. Must be one of the following types: int32, int64. A 1-D tensor. Has same rank as segment_ids. segment_ids: A Tensor of type int32. A 1-D tensor. Value

tf.contrib.distributions.Uniform.dtype

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

tf.contrib.distributions.Chi2.batch_shape()

tf.contrib.distributions.Chi2.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.MultivariateNormalFull.prob()

tf.contrib.distributions.MultivariateNormalFull.prob(value, name='prob') Probability density/mass function (depending on is_continuous). Additional documentation from _MultivariateNormalOperatorPD: x is a batch vector with compatible shape if x is a Tensor whose shape can be broadcast up to either: self.batch_shape + self.event_shape or [M1,...,Mm] + self.batch_shape + self.event_shape Args: value: float or double Tensor. name: The name to give this op. Returns: prob: a Tensor of shape