class_docstr: Iterator capable of reading images from a directory on disk.
  
  # Arguments
      directory: string, path to the directory to read images from.
          Each subdirectory in this directory will be
          considered to contain images from one class,
          or alternatively you could specify class subdirectories
          via the `classes` argument.
      image_data_generator: Instance of `ImageDataGenerator`
          to use for random transformations and normalization.
      target_size: tuple of integers, dimensions to resize input images to.
      color_mode: One of `"rgb"`, `"rgba"`, `"grayscale"`.
          Color mode to read images.
      classes: Optional list of strings, names of subdirectories
          containing images from each class (e.g. `["dogs", "cats"]`).
          It will be computed automatically if not set.
      class_mode: Mode for yielding the targets:
          `"binary"`: binary targets (if there are only two classes),
          `"categorical"`: categorical targets,
          `"sparse"`: integer targets,
          `"input"`: targets are images identical to input images (mainly
              used to work with autoencoders),
          `None`: no targets get yielded (only input images are yielded).
      batch_size: Integer, size of a batch.
      shuffle: Boolean, whether to shuffle the data between epochs.
          If set to False, sorts the data in alphanumeric order.
      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).
      follow_links: Boolean, follow symbolic links to subdirectories
      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.
      keep_aspect_ratio: Boolean, whether to resize images to a target size
          without aspect ratio distortion. The image is cropped in the center
          with target aspect ratio before resizing.
      dtype: Dtype to use for generated arrays.
class_docstr_tok: ["Iterator","capable","of","reading","images","from","a","directory","on","disk",".","#","Arguments","directory",":","string",",","path","to","the","directory","to","read","images","from",".","Each","subdirectory","in","this","directory","will","be","considered","to","contain","images","from","one","class",",","or","alternatively","you","could","specify","class","subdirectories","via","the","`","classes","`","argument",".","image_data_generator",":","Instance","of","`","ImageDataGenerator","`","to","use","for","random","transformations","and","normalization",".","target_size",":","tuple","of","integers",",","dimensions","to","resize","input","images","to",".","color_mode",":","One","of","`","``","rgb","''","`",",","`","``","rgba","''","`",",","`","``","grayscale","''","`",".","Color","mode","to","read","images",".","classes",":","Optional","list","of","strings",",","names","of","subdirectories","containing","images","from","each","class","(","e.g",".","`","[","``","dogs","''",",","``","cats","''","]","`",")",".","It","will","be","computed","automatically","if","not","set",".","class_mode",":","Mode","for","yielding","the","targets",":","`","``","binary","''","`",":","binary","targets","(","if","there","are","only","two","classes",")",",","`","``","categorical","''","`",":","categorical","targets",",","`","``","sparse","''","`",":","integer","targets",",","`","``","input","''","`",":","targets","are","images","identical","to","input","images","(","mainly","used","to","work","with","autoencoders",")",",","`","None","`",":","no","targets","get","yielded","(","only","input","images","are","yielded",")",".","batch_size",":","Integer",",","size","of","a","batch",".","shuffle",":","Boolean",",","whether","to","shuffle","the","data","between","epochs",".","If","set","to","False",",","sorts","the","data","in","alphanumeric","order",".","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",")",".","follow_links",":","Boolean",",","follow","symbolic","links","to","subdirectories","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",".","keep_aspect_ratio",":","Boolean",",","whether","to","resize","images","to","a","target","size","without","aspect","ratio","distortion",".","The","image","is","cropped","in","the","center","with","target","aspect","ratio","before","resizing",".","dtype",":","Dtype","to","use","for","generated","arrays","."]
code: def sample_weight(self):
      # no sample weights will be returned
      return None
  
file_path: keras-preprocessing/keras_preprocessing/image/directory_iterator.py
imports: import multiprocessing.pool
  import os
  import numpy
  from .iterator import BatchFromFilesMixin, Iterator
  from .utils import _list_valid_filenames_in_directory
label_desc: Use image node_id 5 for calling the DirectoryIterator obj's underlying member method code with example usage: obj.sample_weight() and returns: None