Base class for image data iterators.
Inherits From: PyDataset
tf.keras.preprocessing.image.Iterator(
n, batch_size, shuffle, seed
)
DEPRECATED.
Every Iterator must implement the _get_batches_of_transformed_samples method.
| Args | |
|---|---|
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. |
| Attributes | |
|---|---|
max_queue_size | |
num_batches | Number of batches in the PyDataset. |
use_multiprocessing | |
workers | |
on_epoch_endon_epoch_end()
Method called at the end of every epoch.
resetreset()
__getitem____getitem__(
idx
)
Gets batch at position index.
| Args | |
|---|---|
index | position of the batch in the PyDataset. |
| Returns | |
|---|---|
| A batch |
__iter____iter__()
__len____len__()
| Class Variables | |
|---|---|
| white_list_formats | ('png', 'jpg', 'jpeg', 'bmp', 'ppm', 'tif', 'tiff') |
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/Iterator