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 serialize(self, serializer):
      self.current_position = serializer(
          "current_position", self.current_position
      )
      self.epoch = serializer("epoch", self.epoch)
      self.is_new_epoch = serializer("is_new_epoch", self.is_new_epoch)
      try:
          self._previous_epoch_detail = serializer(
              "previous_epoch_detail", self._previous_epoch_detail
          )
      except KeyError:
          # guess previous_epoch_detail for older version
          self._previous_epoch_detail = (
              self.epoch
              + (self.current_position - self.batch_size)
              / self.epoch_size
          )
          if self.epoch_detail > 0:
              self._previous_epoch_detail = max(
                  self._previous_epoch_detail, 0.0
              )
          else:
              self._previous_epoch_detail = -1.0
  
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 6 for calling the DaliIterator obj's underlying member method code with example usage: obj.serialize(serializer) without return types