View source on GitHub
|
Builds a Enqueuer from a Sequence.
Inherits From: SequenceEnqueuer
tf.keras.utils.OrderedEnqueuer(
sequence, use_multiprocessing=False, shuffle=False
)
Used in fit_generator, evaluate_generator, predict_generator.
sequence: A tf.keras.utils.data_utils.Sequence object.use_multiprocessing: use multiprocessing if True, otherwise threadingshuffle: whether to shuffle the data at the beginning of each epochgetget()
Creates a generator to extract data from the queue.
Skip the data if it is None.
The next element in the queue, i.e. a tuple
(inputs, targets) or
(inputs, targets, sample_weights).
is_runningis_running()
startstart(
workers=1, max_queue_size=10
)
Starts the handler's workers.
workers: Number of workers.max_queue_size: queue size
(when full, workers could block on put())stopstop(
timeout=None
)
Stops running threads and wait for them to exit, if necessary.
Should be called by the same thread which called start().
timeout: maximum time to wait on thread.join()