class_docstr: Pytorch dataloader in chainer style.
  
  Args:
      all args for torch.utils.data.dataloader.Dataloader
class_docstr_tok: ["Pytorch","dataloader","in","chainer","style",".","Args",":","all","args","for","torch.utils.data.dataloader.Dataloader"]
docstr: Init function.
docstr_tok: ["Init","function","."]
code: def __init__(self, **kwargs):
      """Init function."""
      self.loader = torch.utils.data.dataloader.DataLoader(**kwargs)
      if hasattr(self.loader, "__len__"):
          # To support DistribtedSampler.
          # When using DDP, the size of dataset itself is different from
          # the size returned by DataLoader.
          # Unless using length of dataloader, at the end of iterations,
          # this loader class can't recognize the end of each epoch.
          self.len = len(self.loader)
      else:
          self.len = len(kwargs["dataset"])
      self.current_position = 0
      self.epoch = 0
      self.iter = None
      self.kwargs = kwargs
  
file_path: espnet/espnet/utils/dataset.py
imports: import torch
  import torch.utils.data
label_desc: Use image node_id 2 to create a new ChainerDataLoader object from inherited base classes: object with example: obj = ChainerDataLoader()