contrib.keras.preprocessing.image.NumpyArrayIterator

tf.contrib.keras.preprocessing.image.NumpyArrayIterator

class tf.contrib.keras.preprocessing.image.NumpyArrayIterator

Defined in tensorflow/contrib/keras/python/keras/preprocessing/image.py.

Iterator yielding data from a Numpy array.

Arguments:

x: Numpy array of input data.
y: Numpy array of targets data.
image_data_generator: Instance of `ImageDataGenerator`
    to use for random transformations and normalization.
batch_size: Integer, size of a batch.
shuffle: Boolean, whether to shuffle the data between epochs.
seed: Random seed for data shuffling.
data_format: String, one of `channels_first`, `channels_last`.
save_to_dir: Optional directory where to save the pictures
    being yielded, in a viewable format. This is useful
    for visualizing the random transformations being
    applied, for debugging purposes.
save_prefix: String prefix to use for saving sample
    images (if `save_to_dir` is set).
save_format: Format to use for saving sample images
    (if `save_to_dir` is set).

Methods

__init__

__init__(
    x,
    y,
    image_data_generator,
    batch_size=32,
    shuffle=False,
    seed=None,
    data_format=None,
    save_to_dir=None,
    save_prefix='',
    save_format='jpeg'
)

__iter__

__iter__()

__next__

__next__(
    *args,
    **kwargs
)

next

next()

For python 2.x.

Returns:

The next batch.

reset

reset()

© 2017 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/api_docs/python/tf/contrib/keras/preprocessing/image/NumpyArrayIterator

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部