GeneratorEnqueuer
Inherits From: SequenceEnqueuer
Defined in tensorflow/python/keras/_impl/keras/utils/data_utils.py.
Builds a queue out of a data generator.
Used in fit_generator, evaluate_generator, predict_generator.
generator: a generator function which endlessly yields datause_multiprocessing: use multiprocessing if True, otherwise threadingwait_time: time to sleep in-between calls to put()
random_seed: Initial seed for workers, will be incremented by one for each workers.__init____init__(
generator,
use_multiprocessing=False,
wait_time=0.05,
random_seed=None
)
getget()
Creates a generator to extract data from the queue.
Skip the data if it is None.
Data arrays.
is_runningis_running()
startstart(
workers=1,
max_queue_size=10
)
Kicks off threads which add data from the generator into the queue.
workers: number of worker threadsmax_queue_size: queue size (when full, threads 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().
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/keras/utils/GeneratorEnqueuer