class_docstr: (Experimental) Iterator for DALI pipeline.
  
  Args:
      pipeline: DALI pipeline.
      repeat (bool): If ``True``, it infinitely loops over the dataset.
          Otherwise, it stops iteration at the end of the first epoch.
class_docstr_tok: ["(","Experimental",")","Iterator","for","DALI","pipeline",".","Args",":","pipeline",":","DALI","pipeline",".","repeat","(","bool",")",":","If","``","True","``",",","it","infinitely","loops","over","the","dataset",".","Otherwise",",","it","stops","iteration","at","the","end","of","the","first","epoch","."]
code: def __next__(self):
      if not self._is_build:
          self.pipeline.build()
          self._is_build = True
          self.epoch_size = tuple(self.pipeline.epoch_size().values())[
              0
          ]
  
      if not self._repeat and self.epoch > 0:
          raise StopIteration
  
      self._previous_epoch_detail = self.epoch_detail
  
      i = self.current_position
      i_end = i + self.batch_size
      N = self.epoch_size
      if i_end >= N:
          if self._repeat:
              self.current_position = i_end - N
          else:
              self.current_position = 0
          self.epoch += 1
          self.is_new_epoch = True
      else:
          self.current_position = i_end
          self.is_new_epoch = False
  
      return self.pipeline.run()
  
file_path: chainer/chainer/iterators/dali_iterator.py
imports: from __future__ import division
  from chainer.dataset import iterator
  from chainer import utils
label_desc: Use image node_id 2 for calling the DaliIterator obj's underlying member method code with example usage: obj.__next__() and returns: self