tf.keras.preprocessing.image.Iterator
| Просмотреть исходный код на GitHub |
Базовый класс для итераторов данных изображений.
Наследуется от: Sequence
tf.keras.preprocessing.image.Iterator(
n, batch_size, shuffle, seed
)
Каждый Iterator должен реализовать метод _get_batches_of_transformed_samples.
Аргументы
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.
Методы
next
next()
Для python 2.x.
Возвращаемое значение
The next batch.
on_epoch_end
on_epoch_end()
reset
reset()
__getitem__
__getitem__(
idx
)
__iter__
__iter__()
__len__
__len__()
Переменные класса
-
white_list_formats
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/keras/preprocessing/image/Iterator