View source on GitHub
|
Base class for image data iterators.
Inherits From: Sequence
tf.keras.preprocessing.image.Iterator(
n, batch_size, shuffle, seed
)
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.
__getitem____getitem__(
idx
)
Gets batch at position index.
index: position of the batch in the Sequence.A batch
__iter____iter__()
Create a generator that iterate over the Sequence.
__len____len__()
Number of batch in the Sequence.
The number of batches in the Sequence.
nextnext()
For python 2.x.
The next batch.
on_epoch_endon_epoch_end()
Method called at the end of every epoch.
resetreset()