def flow_from_directory(self, directory, target_size=(256, 256), color_mode='rgb', classes=None, class_mode='categorical', batch_size=32, shuffle=True, seed=None, save_to_dir=None, save_prefix='', save_format='png', follow_links=False, subset=None, interpolation='nearest'):
    'Takes the path to a directory & generates batches of augmented data.\n\n        # Arguments\n            directory: Path to the target directory.\n                It should contain one subdirectory per class.\n                Any PNG, JPG, BMP, PPM or TIF images\n                inside each of the subdirectories directory tree\n                will be included in the generator.\n                See [this script](https://gist.github.com/fchollet/0830affa1f7f19fd47b06d4cf89ed44d)\n                for more details.\n            target_size: Tuple of integers `(height, width)`,\n                default: `(256, 256)`.\n                The dimensions to which all images found will be resized.\n            color_mode: One of "grayscale", "rbg". Default: "rgb".\n                Whether the images will be converted to\n                have 1 or 3 color channels.\n            classes: Optional list of class subdirectories\n                (e.g. `[\'dogs\', \'cats\']`). Default: None.\n                If not provided, the list of classes will be automatically\n                inferred from the subdirectory names/structure\n                under `directory`, where each subdirectory will\n                be treated as a different class\n                (and the order of the classes, which will map to the label\n                indices, will be alphanumeric).\n                The dictionary containing the mapping from class names to class\n                indices can be obtained via the attribute `class_indices`.\n            class_mode: One of "categorical", "binary", "sparse",\n                "input", or None. Default: "categorical".\n                Determines the type of label arrays that are returned:\n                - "categorical" will be 2D one-hot encoded labels,\n                - "binary" will be 1D binary labels,\n                    "sparse" will be 1D integer labels,\n                - "input" will be images identical\n                    to input images (mainly used to work with autoencoders).\n                - If None, no labels are returned\n                (the generator will only yield batches of image data,\n                which is useful to use with `model.predict_generator()`,\n                `model.evaluate_generator()`, etc.).\n                Please note that in case of class_mode None,\n                the data still needs to reside in a subdirectory\n                of `directory` for it to work correctly.\n            batch_size: Size of the batches of data (default: 32).\n            shuffle: Whether to shuffle the data (default: True)\n            seed: Optional random seed for shuffling and transformations.\n            save_to_dir: None or str (default: None).\n                This allows you to optionally specify\n                a directory to which to save\n                the augmented pictures being generated\n                (useful for visualizing what you are doing).\n            save_prefix: Str. Prefix to use for filenames of saved pictures\n                (only relevant if `save_to_dir` is set).\n            save_format: One of "png", "jpeg"\n                (only relevant if `save_to_dir` is set). Default: "png".\n            follow_links: Whether to follow symlinks inside\n                class subdirectories (default: False).\n            subset: Subset of data (`"training"` or `"validation"`) if\n                `validation_split` is set in `ImageDataGenerator`.\n            interpolation: Interpolation method used to\n                resample the image if the\n                target size is different from that of the loaded image.\n                Supported methods are `"nearest"`, `"bilinear"`,\n                and `"bicubic"`.\n                If PIL version 1.1.3 or newer is installed, `"lanczos"` is also\n                supported. If PIL version 3.4.0 or newer is installed,\n                `"box"` and `"hamming"` are also supported.\n                By default, `"nearest"` is used.\n\n        # Returns\n            A `DirectoryIterator` yielding tuples of `(x, y)`\n                where `x` is a numpy array containing a batch\n                of images with shape `(batch_size, *target_size, channels)`\n                and `y` is a numpy array of corresponding labels.\n        '
    return DirectoryIterator(directory, self, target_size=target_size, color_mode=color_mode, classes=classes, class_mode=class_mode, data_format=self.data_format, batch_size=batch_size, shuffle=shuffle, seed=seed, save_to_dir=save_to_dir, save_prefix=save_prefix, save_format=save_format, follow_links=follow_links, subset=subset, interpolation=interpolation)
Takes the path to a directory & generates batches of augmented data.

# Arguments
    directory: Path to the target directory.
        It should contain one subdirectory per class.
        Any PNG, JPG, BMP, PPM or TIF images
        inside each of the subdirectories directory tree
        will be included in the generator.
        See [this script](https://gist.github.com/fchollet/0830affa1f7f19fd47b06d4cf89ed44d)
        for more details.
    target_size: Tuple of integers `(height, width)`,
        default: `(256, 256)`.
        The dimensions to which all images found will be resized.
    color_mode: One of "grayscale", "rbg". Default: "rgb".
        Whether the images will be converted to
        have 1 or 3 color channels.
    classes: Optional list of class subdirectories
        (e.g. `['dogs', 'cats']`). Default: None.
        If not provided, the list of classes will be automatically
        inferred from the subdirectory names/structure
        under `directory`, where each subdirectory will
        be treated as a different class
        (and the order of the classes, which will map to the label
        indices, will be alphanumeric).
        The dictionary containing the mapping from class names to class
        indices can be obtained via the attribute `class_indices`.
    class_mode: One of "categorical", "binary", "sparse",
        "input", or None. Default: "categorical".
        Determines the type of label arrays that are returned:
        - "categorical" will be 2D one-hot encoded labels,
        - "binary" will be 1D binary labels,
            "sparse" will be 1D integer labels,
        - "input" will be images identical
            to input images (mainly used to work with autoencoders).
        - If None, no labels are returned
        (the generator will only yield batches of image data,
        which is useful to use with `model.predict_generator()`,
        `model.evaluate_generator()`, etc.).
        Please note that in case of class_mode None,
        the data still needs to reside in a subdirectory
        of `directory` for it to work correctly.
    batch_size: Size of the batches of data (default: 32).
    shuffle: Whether to shuffle the data (default: True)
    seed: Optional random seed for shuffling and transformations.
    save_to_dir: None or str (default: None).
        This allows you to optionally specify
        a directory to which to save
        the augmented pictures being generated
        (useful for visualizing what you are doing).
    save_prefix: Str. Prefix to use for filenames of saved pictures
        (only relevant if `save_to_dir` is set).
    save_format: One of "png", "jpeg"
        (only relevant if `save_to_dir` is set). Default: "png".
    follow_links: Whether to follow symlinks inside
        class subdirectories (default: False).
    subset: Subset of data (`"training"` or `"validation"`) if
        `validation_split` is set in `ImageDataGenerator`.
    interpolation: Interpolation method used to
        resample the image if the
        target size is different from that of the loaded image.
        Supported methods are `"nearest"`, `"bilinear"`,
        and `"bicubic"`.
        If PIL version 1.1.3 or newer is installed, `"lanczos"` is also
        supported. If PIL version 3.4.0 or newer is installed,
        `"box"` and `"hamming"` are also supported.
        By default, `"nearest"` is used.

# Returns
    A `DirectoryIterator` yielding tuples of `(x, y)`
        where `x` is a numpy array containing a batch
        of images with shape `(batch_size, *target_size, channels)`
        and `y` is a numpy array of corresponding labels.
def flow_from_directory(self, directory, target_size=(256, 256), color_mode='rgb', classes=None, class_mode='categorical', batch_size=32, shuffle=True, seed=None, save_to_dir=None, save_prefix=, save_format='png', follow_links=False, subset=None, interpolation='nearest'):
    'Takes the path to a directory & generates batches of augmented data.\n\n        # Arguments\n            directory: Path to the target directory.\n                It should contain one subdirectory per class.\n                Any PNG, JPG, BMP, PPM or TIF images\n                inside each of the subdirectories directory tree\n                will be included in the generator.\n                See [this script](https://gist.github.com/fchollet/0830affa1f7f19fd47b06d4cf89ed44d)\n                for more details.\n            target_size: Tuple of integers `(height, width)`,\n                default: `(256, 256)`.\n                The dimensions to which all images found will be resized.\n            color_mode: One of "grayscale", "rbg". Default: "rgb".\n                Whether the images will be converted to\n                have 1 or 3 color channels.\n            classes: Optional list of class subdirectories\n                (e.g. `[\'dogs\', \'cats\']`). Default: None.\n                If not provided, the list of classes will be automatically\n                inferred from the subdirectory names/structure\n                under `directory`, where each subdirectory will\n                be treated as a different class\n                (and the order of the classes, which will map to the label\n                indices, will be alphanumeric).\n                The dictionary containing the mapping from class names to class\n                indices can be obtained via the attribute `class_indices`.\n            class_mode: One of "categorical", "binary", "sparse",\n                "input", or None. Default: "categorical".\n                Determines the type of label arrays that are returned:\n                - "categorical" will be 2D one-hot encoded labels,\n                - "binary" will be 1D binary labels,\n                    "sparse" will be 1D integer labels,\n                - "input" will be images identical\n                    to input images (mainly used to work with autoencoders).\n                - If None, no labels are returned\n                (the generator will only yield batches of image data,\n                which is useful to use with `model.predict_generator()`,\n                `model.evaluate_generator()`, etc.).\n                Please note that in case of class_mode None,\n                the data still needs to reside in a subdirectory\n                of `directory` for it to work correctly.\n            batch_size: Size of the batches of data (default: 32).\n            shuffle: Whether to shuffle the data (default: True)\n            seed: Optional random seed for shuffling and transformations.\n            save_to_dir: None or str (default: None).\n                This allows you to optionally specify\n                a directory to which to save\n                the augmented pictures being generated\n                (useful for visualizing what you are doing).\n            save_prefix: Str. Prefix to use for filenames of saved pictures\n                (only relevant if `save_to_dir` is set).\n            save_format: One of "png", "jpeg"\n                (only relevant if `save_to_dir` is set). Default: "png".\n            follow_links: Whether to follow symlinks inside\n                class subdirectories (default: False).\n            subset: Subset of data (`"training"` or `"validation"`) if\n                `validation_split` is set in `ImageDataGenerator`.\n            interpolation: Interpolation method used to\n                resample the image if the\n                target size is different from that of the loaded image.\n                Supported methods are `"nearest"`, `"bilinear"`,\n                and `"bicubic"`.\n                If PIL version 1.1.3 or newer is installed, `"lanczos"` is also\n                supported. If PIL version 3.4.0 or newer is installed,\n                `"box"` and `"hamming"` are also supported.\n                By default, `"nearest"` is used.\n\n        # Returns\n            A `DirectoryIterator` yielding tuples of `(x, y)`\n                where `x` is a numpy array containing a batch\n                of images with shape `(batch_size, *target_size, channels)`\n                and `y` is a numpy array of corresponding labels.\n        '
    return DirectoryIterator(directory, self, target_size=target_size, color_mode=color_mode, classes=classes, class_mode=class_mode, data_format=self.data_format, batch_size=batch_size, shuffle=shuffle, seed=seed, save_to_dir=save_to_dir, save_prefix=save_prefix, save_format=save_format, follow_links=follow_links, subset=subset, interpolation=interpolation)