tf.keras.preprocessing.image.NumpyArrayIterator

View source on GitHub

Iterator yielding data from a Numpy array.

Inherits From: Iterator

tf.keras.preprocessing.image.NumpyArrayIterator(
    x, y, image_data_generator, batch_size=32, shuffle=False, sample_weight=None,
    seed=None, data_format=None, save_to_dir=None, save_prefix='',
    save_format='png', subset=None, dtype=None
)

Arguments:

Methods

__getitem__

__getitem__(
    idx
)

Gets batch at position index.

Arguments:

Returns:

A batch

__iter__

__iter__()

Create a generator that iterate over the Sequence.

__len__

__len__()

Number of batch in the Sequence.

Returns:

The number of batches in the Sequence.

next

next()

For python 2.x.

Returns

The next batch.

on_epoch_end

on_epoch_end()

Method called at the end of every epoch.

reset

reset()

Class Variables