tf.keras.preprocessing.image.Iterator

Class 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.

Arguments:

  • 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.

Methods

__init__

__init__(
    n,
    batch_size,
    shuffle,
    seed
)

__getitem__

__getitem__(idx)

__iter__

__iter__()

__len__

__len__()

__next__

__next__(
    *args,
    **kwargs
)

on_epoch_end

on_epoch_end()

reset

reset()