tf.contrib.bayesflow.stochastic_tensor.UniformTensor.loss()

tf.contrib.bayesflow.stochastic_tensor.UniformTensor.loss(final_loss, name='Loss')

tf.contrib.training.stratified_sample()

tf.contrib.training.stratified_sample(tensors, labels, target_probs, batch_size, init_probs=None, enqueue_many=False, queue_capacity=16, threads_per_queue=1, name=None) Stochastically creates batches based on per-class probabilities. This method discards examples. Internally, it creates one queue to amortize the cost of disk reads, and one queue to hold the properly-proportioned batch. See stratified_sample_unknown_dist for a function that performs stratified sampling with one queue per class

tf.contrib.learn.TensorFlowRNNRegressor.partial_fit()

tf.contrib.learn.TensorFlowRNNRegressor.partial_fit(x, y) Incremental fit on a batch of samples. This method is expected to be called several times consecutively on different or the same chunks of the dataset. This either can implement iterative training or out-of-core/online training. This is especially useful when the whole dataset is too big to fit in memory at the same time. Or when model is taking long time to converge, and you want to split up training into subparts. Args: x: matrix or t

tf.contrib.layers.l2_regularizer()

tf.contrib.layers.l2_regularizer(scale, scope=None) Returns a function that can be used to apply L2 regularization to weights. Small values of L2 can help prevent overfitting the training data. Args: scale: A scalar multiplier Tensor. 0.0 disables the regularizer. scope: An optional scope name. Returns: A function with signature l2(weights) that applies L2 regularization. Raises: ValueError: If scale is negative or if scale is not a float.

tf.image.rgb_to_grayscale()

tf.image.rgb_to_grayscale(images, name=None) Converts one or more images from RGB to Grayscale. Outputs a tensor of the same DType and rank as images. The size of the last dimension of the output is 1, containing the Grayscale value of the pixels. Args: images: The RGB tensor to convert. Last dimension must have size 3 and should contain RGB values. name: A name for the operation (optional). Returns: The converted grayscale image(s).

tf.contrib.distributions.MultivariateNormalCholesky.batch_shape()

tf.contrib.distributions.MultivariateNormalCholesky.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.MultivariateNormalCholesky.get_event_shape()

tf.contrib.distributions.MultivariateNormalCholesky.get_event_shape() Shape of a single sample from a single batch as a TensorShape. Same meaning as event_shape. May be only partially defined. Returns: event_shape: TensorShape, possibly unknown.

tf.contrib.distributions.TransformedDistribution.pdf()

tf.contrib.distributions.TransformedDistribution.pdf(value, name='pdf') Probability density function. Args: value: float or double Tensor. name: The name to give this op. Returns: prob: a Tensor of shape sample_shape(x) + self.batch_shape with values of type self.dtype. Raises: TypeError: if not is_continuous.

tf.contrib.util.stripped_op_list_for_graph()

tf.contrib.util.stripped_op_list_for_graph(graph_def) Collect the stripped OpDefs for ops used by a graph. This function computes the stripped_op_list field of MetaGraphDef and similar protos. The result can be communicated from the producer to the consumer, which can then use the C++ function RemoveNewDefaultAttrsFromGraphDef to improve forwards compatibility. Args: graph_def: A GraphDef proto, as from graph.as_graph_def(). Returns: An OpList of ops used by the graph. Raises: ValueError:

tf.contrib.learn.TensorFlowEstimator.predict_proba()

tf.contrib.learn.TensorFlowEstimator.predict_proba(x, batch_size=None) Predict class probability of the input samples x. Args: x: array-like matrix, [n_samples, n_features...] or iterator. batch_size: If test set is too big, use batch size to split it into mini batches. By default the batch_size member variable is used. Returns: y: array of shape [n_samples, n_classes]. The predicted probabilities for each class.