tf.QueueBase.dtypes

tf.QueueBase.dtypes The list of dtypes for each component of a queue element.

tf.QueueBase.dequeue_up_to()

tf.QueueBase.dequeue_up_to(n, name=None) Dequeues and concatenates n elements from this queue. Note This operation is not supported by all queues. If a queue does not support DequeueUpTo, then a tf.errors.UnimplementedError is raised. This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. If the queue has not been closed, all of the components in the dequeued tuple will have size n in the 0th dimension. If the queue is closed and

tf.QueueBase.dequeue_many()

tf.QueueBase.dequeue_many(n, name=None) Dequeues and concatenates n elements from this queue. This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. All of the components in the dequeued tuple will have size n in the 0th dimension. If the queue is closed and there are less than n elements left, then an OutOfRange exception is raised. At runtime, this operation may raise an error if the queue is closed before or during its executio

tf.QueueBase.dequeue()

tf.QueueBase.dequeue(name=None) Dequeues one element from this queue. If the queue is empty when this operation executes, it will block until there is an element to dequeue. At runtime, this operation may raise an error if the queue is closed before or during its execution. If the queue is closed, the queue is empty, and there are no pending enqueue operations that can fulfil this request, tf.errors.OutOfRangeError will be raised. If the session is closed, tf.errors.CancelledError will be rais

tf.QueueBase.close()

tf.QueueBase.close(cancel_pending_enqueues=False, name=None) Closes this queue. This operation signals that no more elements will be enqueued in the given queue. Subsequent enqueue and enqueue_many operations will fail. Subsequent dequeue and dequeue_many operations will continue to succeed if sufficient elements remain in the queue. Subsequent dequeue and dequeue_many operations that would block will fail immediately. If cancel_pending_enqueues is True, all pending requests will also be cance

tf.QueueBase

class tf.QueueBase Base class for queue implementations. A queue is a TensorFlow data structure that stores tensors across multiple steps, and exposes operations that enqueue and dequeue tensors. Each queue element is a tuple of one or more tensors, where each tuple component has a static dtype, and may have a static shape. The queue implementations support versions of enqueue and dequeue that handle single elements, versions that support enqueuing and dequeuing a batch of elements at once. Se

tf.py_func()

tf.py_func(func, inp, Tout, stateful=True, name=None) Wraps a python function and uses it as a tensorflow op. Given a python function func, which takes numpy arrays as its inputs and returns numpy arrays as its outputs. E.g., def my_func(x): # x will be a numpy array with the contents of the placeholder below return np.sinh(x) inp = tf.placeholder(tf.float32, [...]) y = py_func(my_func, [inp], [tf.float32]) The above snippet constructs a tf graph which invokes a numpy sinh(x) as an op in

tf.python_io.tf_record_iterator()

tf.python_io.tf_record_iterator(path, options=None) An iterator that read the records from a TFRecords file. Args: path: The path to the TFRecords file. options: (optional) A TFRecordOptions object. Yields: Strings. Raises: IOError: If path cannot be opened for reading.

tf.python_io.TFRecordWriter.__init__()

tf.python_io.TFRecordWriter.__init__(path, options=None) Opens file path and creates a TFRecordWriter writing to it. Args: path: The path to the TFRecords file. options: (optional) A TFRecordOptions object. Raises: IOError: If path cannot be opened for writing.

tf.python_io.TFRecordWriter.__exit__()

tf.python_io.TFRecordWriter.__exit__(unused_type, unused_value, unused_traceback) Exit a with block, closing the file.