Iterator
Inherits From: Sequence
Defined in tensorflow/python/keras/_impl/keras/preprocessing/image.py
.
Base class for image data iterators.
Every Iterator
must implement the _get_batches_of_transformed_samples
method.
n
: Integer, total number of samples in the dataset to loop over.batch_size
: Integer, size of a batch.shuffle
: Boolean, whether to shuffle the data between epochs.seed
: Random seeding for data shuffling.__init__
__init__( n, batch_size, shuffle, seed )
Initialize self. See help(type(self)) for accurate signature.
__getitem__
__getitem__(idx)
Gets batch at position index
.
index
: position of the batch in the Sequence.A batch
__iter__
__iter__()
Creates an infinite generator that iterate over the Sequence.
Sequence items.
__len__
__len__()
Number of batch in the Sequence.
The number of batches in the Sequence.
__next__
__next__( *args, **kwargs )
on_epoch_end
on_epoch_end()
Method called at the end of every epoch.
reset
reset()
© 2018 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/preprocessing/image/Iterator