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.ReaderBase.read_up_to()

tf.ReaderBase.read_up_to(queue, num_records, name=None) Returns up to num_records (key, value pairs) produced by a reader. Will dequeue a work unit from queue if necessary (e.g., when the Reader needs to start reading from a new file since it has finished with the previous file). It may return less than num_records even before the last batch. Args: queue: A Queue or a mutable string Tensor representing a handle to a Queue, with string work items. num_records: Number of records to read. name

tf.contrib.learn.TensorFlowRNNClassifier.evaluate()

tf.contrib.learn.TensorFlowRNNClassifier.evaluate(x=None, y=None, input_fn=None, feed_fn=None, batch_size=None, steps=None, metrics=None, name=None) Evaluates given model with provided evaluation data. See superclass Estimator for more details. Args: x: features. y: targets. input_fn: Input function. feed_fn: Function creating a feed dict every time it is called. batch_size: minibatch size to use on the input. steps: Number of steps for which to evaluate model. metrics: Dict of metric o

tf.contrib.learn.TensorFlowRNNClassifier.partial_fit()

tf.contrib.learn.TensorFlowRNNClassifier.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

tf.contrib.distributions.Laplace.allow_nan_stats

tf.contrib.distributions.Laplace.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 u

tf.sparse_maximum()

tf.sparse_maximum(sp_a, sp_b, name=None) Returns the element-wise max of two SparseTensors. Assumes the two SparseTensors have the same shape, i.e., no broadcasting. Example: sp_zero = ops.SparseTensor([[0]], [0], [7]) sp_one = ops.SparseTensor([[1]], [1], [7]) res = tf.sparse_maximum(sp_zero, sp_one).eval() # "res" should be equal to SparseTensor([[0], [1]], [0, 1], [7]). Args: sp_a: a SparseTensor operand whose dtype is real, and indices lexicographically ordered. sp_b: the other SparseTe

tf.contrib.learn.DNNClassifier.get_variable_names()

tf.contrib.learn.DNNClassifier.get_variable_names() Returns list of all variable names in this model. Returns: List of names.

tf.contrib.graph_editor.select_ops()

tf.contrib.graph_editor.select_ops(*args, **kwargs) Helper to select operations. Args: *args: list of 1) regular expressions (compiled or not) or 2) (array of) tf.Operation. tf.Tensor instances are silently ignored. **kwargs: 'graph': tf.Graph in which to perform the regex query.This is required when using regex. 'positive_filter': an elem if selected only if positive_filter(elem) is True. This is optional. 'restrict_ops_regex': a regular expression is ignored if it doesn't start with the su

tf.image.resize_nearest_neighbor()

tf.image.resize_nearest_neighbor(images, size, align_corners=None, name=None) Resize images to size using nearest neighbor interpolation. Args: images: A Tensor. Must be one of the following types: uint8, int8, int16, int32, int64, half, float32, float64. 4-D with shape [batch, height, width, channels]. size: A 1-D int32 Tensor of 2 elements: new_height, new_width. The new size for the images. align_corners: An optional bool. Defaults to False. If true, rescale input by (new_height - 1) / (