tf.assert_rank_at_least()

tf.assert_rank_at_least(x, rank, data=None, summarize=None, message=None, name=None) Assert x has rank equal to rank or higher. Example of adding a dependency to an operation: with tf.control_dependencies([tf.assert_rank_at_least(x, 2)]): output = tf.reduce_sum(x) Example of adding dependency to the tensor being checked: x = tf.with_dependencies([tf.assert_rank_at_least(x, 2)], x) Args: x: Numeric Tensor. rank: Scalar Tensor. data: The tensors to print out if the condition is False. Def

tf.contrib.distributions.Uniform.log_prob()

tf.contrib.distributions.Uniform.log_prob(value, name='log_prob') Log probability density/mass function (depending on is_continuous). Args: value: float or double Tensor. name: The name to give this op. Returns: log_prob: a Tensor of shape sample_shape(x) + self.batch_shape with values of type self.dtype.

tf.sparse_tensor_to_dense()

tf.sparse_tensor_to_dense(sp_input, default_value=0, validate_indices=True, name=None) Converts a SparseTensor into a dense tensor. This op is a convenience wrapper around sparse_to_dense for SparseTensors. For example, if sp_input has shape [3, 5] and non-empty string values: [0, 1]: a [0, 3]: b [2, 0]: c and default_value is x, then the output will be a dense [3, 5] string tensor with values: [[x a x b x] [x x x x x] [c x x x x]] Indices must be without repeats. This is only tested if va

tf.contrib.framework.deprecated_arg_values()

tf.contrib.framework.deprecated_arg_values(date, instructions, **deprecated_kwargs) Decorator for marking specific function argument values as deprecated. This decorator logs a deprecation warning whenever the decorated function is called with the deprecated argument values. It has the following format: Calling (from ) with = is deprecated and will be removed after . Instructions for updating: will include the class name if it is a method. It also edits the docstring of the function: ' (dep

tf.image.random_saturation()

tf.image.random_saturation(image, lower, upper, seed=None) Adjust the saturation of an RGB image by a random factor. Equivalent to adjust_saturation() but uses a saturation_factor randomly picked in the interval [lower, upper]. Args: image: RGB image or images. Size of the last dimension must be 3. lower: float. Lower bound for the random saturation factor. upper: float. Upper bound for the random saturation factor. seed: An operation-specific seed. It will be used in conjunction with the

tf.WholeFileReader.read()

tf.WholeFileReader.read(queue, name=None) Returns the next record (key, value pair) 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). Args: queue: A Queue or a mutable string Tensor representing a handle to a Queue, with string work items. name: A name for the operation (optional). Returns: A tuple of Tensors (key, value). key: A string scalar Tensor. value: A

tf.range()

tf.range(start, limit=None, delta=1, name='range') Creates a sequence of integers. Creates a sequence of integers that begins at start and extends by increments of delta up to but not including limit. Like the Python builtin range, start defaults to 0, so that range(n) = range(0, n). For example: # 'start' is 3 # 'limit' is 18 # 'delta' is 3 tf.range(start, limit, delta) ==> [3, 6, 9, 12, 15] # 'limit' is 5 tf.range(limit) ==> [0, 1, 2, 3, 4] Args: start: A 0-D (scalar) of type int32.

tf.assert_equal()

tf.assert_equal(x, y, data=None, summarize=None, message=None, name=None) Assert the condition x == y holds element-wise. Example of adding a dependency to an operation: with tf.control_dependencies([tf.assert_equal(x, y)]): output = tf.reduce_sum(x) Example of adding dependency to the tensor being checked: x = tf.with_dependencies([tf.assert_equal(x, y)], x) This condition holds if for every pair of (possibly broadcast) elements x[i], y[i], we have x[i] == y[i]. If both x and y are empty,

tf.image.random_flip_up_down()

tf.image.random_flip_up_down(image, seed=None) Randomly flips an image vertically (upside down). With a 1 in 2 chance, outputs the contents of image flipped along the first dimension, which is height. Otherwise output the image as-is. Args: image: A 3-D tensor of shape [height, width, channels]. seed: A Python integer. Used to create a random seed. See set_random_seed for behavior. Returns: A 3-D tensor of the same type and shape as image. Raises: ValueError: if the shape of image not su

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