tf.keras.preprocessing.image.Iterator

TensorFlow 1 version View source on GitHub

Base class for image data iterators.

Inherits From: Sequence

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

next

For python 2.x.

Returns

The next batch.

on_epoch_end

Method called at the end of every epoch.

reset

__getitem__

Gets batch at position index.

Arguments
index position of the batch in the Sequence.

Returns
A batch

__iter__

Create a generator that iterate over the Sequence.

__len__

Number of batch in the Sequence.

Returns
The number of batches in the Sequence.

Class Variables

  • white_list_formats