code: def __init__(
      self,
      file_list,
      file_root,
      crop_size,
      batch_size,
      n_threads,
      device_id,
      random_shuffle=True,
      seed=-1,
      mean=None,
      std=None,
      n_samples=None,
  ):
      super(DaliPipelineTrain, self).__init__(
          batch_size, n_threads, device_id, seed=seed
      )
      crop_size = _pair(crop_size)
      if mean is None:
          mean = [0.485 * 255, 0.456 * 255, 0.406 * 255]
      if std is None:
          std = [0.229 * 255, 0.224 * 255, 0.225 * 255]
      if n_samples is None:
          initial_fill = 4096
      else:
          initial_fill = min(4096, n_samples)
      self.loader = ops.FileReader(
          file_root=file_root,
          file_list=file_list,
          random_shuffle=random_shuffle,
          initial_fill=initial_fill,
      )
      self.decode = ops.HostDecoder()
      self.resize = ops.Resize(device="gpu", resize_x=256, resize_y=256)
      # self.hue = ops.Hue(device="gpu")
      # self.bright = ops.Brightness(device="gpu")
      # self.cntrst = ops.Contrast(device="gpu")
      # self.rotate = ops.Rotate(device="gpu")
      # self.jitter = ops.Jitter(device="gpu")
      random_area = (crop_size[0] / 256.0) * (crop_size[1] / 256.0)
      random_area = _pair(random_area)
      random_aspect_ratio = _pair(1.0)
      self.rrcrop = ops.RandomResizedCrop(
          device="gpu",
          size=crop_size,
          random_area=random_area,
          random_aspect_ratio=random_aspect_ratio,
      )
      self.cmnorm = ops.CropMirrorNormalize(
          device="gpu", crop=list(crop_size), mean=mean, std=std
      )
      self.coin = ops.CoinFlip(probability=0.5)
  
file_path: chainer/examples/imagenet/dali_util.py
imports: import numpy
  import chainer
  from chainer.backends import cuda
  import ctypes
label_desc: Use image node_id 1 to create a new DaliPipelineTrain object from inherited base classes: pipeline with example: obj = DaliPipelineTrain(file_list, file_root, crop_size, batch_size, n_threads, device_id, random_shuffle, seed, mean, std, n_samples)