class_docstr: A Multigrid Method for Efficiently Training Video Models
  Chao-Yuan Wu, Ross Girshick, Kaiming He, Christoph Feichtenhofer, Philipp Krähenbühl
  CVPR 2020, https://arxiv.org/abs/1912.00998
class_docstr_tok: ["A","Multigrid","Method","for","Efficiently","Training","Video","Models","Chao-Yuan","Wu",",","Ross","Girshick",",","Kaiming","He",",","Christoph","Feichtenhofer",",","Philipp","Kr\u00e4henb\u00fchl","CVPR","2020",",","https",":","\/\/arxiv.org\/abs\/1912.00998"]
code: def __iter__(self):
      batch = []
      if self.short_cycle_label:
          self.beta = 0
      else:
          self.beta = self.mg_helper.mod_short - 1
      self.batch_scale = self.mg_helper.get_scale(self.alpha, self.beta)
      for idx in self.sampler:
          batch.append([idx, self.alpha, self.beta])
          if len(batch) == self.batch_size * self.batch_scale:
              yield batch
              batch = []
              if self.short_cycle_label:
                  self.beta = (self.beta + 1) % self.mg_helper.mod_short
                  self.batch_scale = self.mg_helper.get_scale(
                      self.alpha, self.beta
                  )
  
      if len(batch) > 0 and not self.drop_last:
          yield batch
  
file_path: gluon-cv/gluoncv/torch/data/video_cls/multigrid_helper.py
imports: from functools import reduce
  import numpy
  from torch.utils.data import Sampler
label_desc: Use image node_id 5 for calling the MultiGridBatchSampler obj's underlying member method code with example usage: obj.__iter__() without return types