tf.ReaderBase.num_work_units_completed()

tf.ReaderBase.num_work_units_completed(name=None) Returns the number of work units this reader has finished processing. Args: name: A name for the operation (optional). Returns: An int64 Tensor.

tf.ReaderBase.num_records_produced()

tf.ReaderBase.num_records_produced(name=None) Returns the number of records this reader has produced. This is the same as the number of Read executions that have succeeded. Args: name: A name for the operation (optional). Returns: An int64 Tensor.

tf.ReaderBase

class tf.ReaderBase Base class for different Reader types, that produce a record every step. Conceptually, Readers convert string 'work units' into records (key, value pairs). Typically the 'work units' are filenames and the records are extracted from the contents of those files. We want a single record produced per step, but a work unit can correspond to many records. Therefore we introduce some decoupling using a queue. The queue contains the work units and the Reader dequeues from the queue

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.random_uniform()

tf.random_uniform(shape, minval=0, maxval=None, dtype=tf.float32, seed=None, name=None) Outputs random values from a uniform distribution. The generated values follow a uniform distribution in the range [minval, maxval). The lower bound minval is included in the range, while the upper bound maxval is excluded. For floats, the default range is [0, 1). For ints, at least maxval must be specified explicitly. In the integer case, the random integers are slightly biased unless maxval - minval is an

tf.random_shuffle()

tf.random_shuffle(value, seed=None, name=None) Randomly shuffles a tensor along its first dimension. The tensor is shuffled along dimension 0, such that each value[j] is mapped to one and only one output[i]. For example, a mapping that might occur for a 3x2 tensor is: [[1, 2], [[5, 6], [3, 4], ==> [1, 2], [5, 6]] [3, 4]] Args: value: A Tensor to be shuffled. seed: A Python integer. Used to create a random seed for the distribution. See set_random_seed for behavior. nam

tf.random_normal()

tf.random_normal(shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, name=None) Outputs random values from a normal distribution. Args: shape: A 1-D integer Tensor or Python array. The shape of the output tensor. mean: A 0-D Tensor or Python value of type dtype. The mean of the normal distribution. stddev: A 0-D Tensor or Python value of type dtype. The standard deviation of the normal distribution. dtype: The type of the output. seed: A Python integer. Used to create a random seed

tf.random_gamma()

tf.random_gamma(shape, alpha, beta=None, dtype=tf.float32, seed=None, name=None) Draws shape samples from each of the given Gamma distribution(s). alpha is the shape parameter describing the distribution(s), and beta is the inverse scale parameter(s). Example: samples = tf.random_gamma([10], [0.5, 1.5]) # samples has shape [10, 2], where each slice [:, 0] and [:, 1] represents # the samples drawn from each distribution samples = tf.random_gamma([7, 5], [0.5, 1.5]) # samples has shape [7, 5, 2]

tf.random_crop()

tf.random_crop(value, size, seed=None, name=None) Randomly crops a tensor to a given size. Slices a shape size portion out of value at a uniformly chosen offset. Requires value.shape >= size. If a dimension should not be cropped, pass the full size of that dimension. For example, RGB images can be cropped with size = [crop_height, crop_width, 3]. Args: value: Input tensor to crop. size: 1-D tensor with size the rank of value. seed: Python integer. Used to create a random seed. See set_ra

tf.RandomShuffleQueue.__init__()

tf.RandomShuffleQueue.__init__(capacity, min_after_dequeue, dtypes, shapes=None, names=None, seed=None, shared_name=None, name='random_shuffle_queue') Create a queue that dequeues elements in a random order. A RandomShuffleQueue has bounded capacity; supports multiple concurrent producers and consumers; and provides exactly-once delivery. A RandomShuffleQueue holds a list of up to capacity elements. Each element is a fixed-length tuple of tensors whose dtypes are described by dtypes, and whose