(self)
return batch
Return a Batch from the batch queue.

    If mode='decode' then each batch contains a single example repeated beam_size-many times; this is necessary for beam search.

    Returns:
      batch: a Batch object, or None if we're in single_pass mode and we've exhausted the dataset.
Return a Batch from the batch queue.
Return a Batch from the batch queue .
def next_batch(self):
    """Return a Batch from the batch queue.

    If mode='decode' then each batch contains a single example repeated beam_size-many times; this is necessary for beam search.

    Returns:
      batch: a Batch object, or None if we're in single_pass mode and we've exhausted the dataset.
    """
    # If the batch queue is empty, print a warning
    if self._batch_queue.qsize() == 0:
      tf.logging.warning('Bucket input queue is empty when calling next_batch. Bucket queue size: %i, Input queue size: %i', self._batch_queue.qsize(), self._example_queue.qsize())
      if self._single_pass and self._finished_reading:
        tf.logging.info("Finished reading dataset in single_pass mode.")
        return None

    batch = self._batch_queue.get() # get the next Batch
    return batch
def next_batch ( self ) : # If the batch queue is empty, print a warning if self . _batch_queue . qsize ( ) == 0 : tf . logging . warning ( 'Bucket input queue is empty when calling next_batch. Bucket queue size: %i, Input queue size: %i' , self . _batch_queue . qsize ( ) , self . _example_queue . qsize ( ) ) if self . _single_pass and self . _finished_reading : tf . logging . info ( "Finished reading dataset in single_pass mode." ) return None batch = self . _batch_queue . get ( ) # get the next Batch return batch