(self, iter_dataloader)
return iter_dataloader, real_batch
Fetches the next set of data and refresh the iterator when it is exhausted.
        Follows python EAFP, so no iterator.hasNext() is used.
Fetches the next set of data and refresh the iterator when it is exhausted.
        Follows python EAFP, so no iterator.hasNext() is used.
Fetches the next set of data and refresh the iterator when it is exhausted . Follows python EAFP so no iterator . hasNext () is used .
def _fetch_data(self, iter_dataloader):
        """
        Fetches the next set of data and refresh the iterator when it is exhausted.
        Follows python EAFP, so no iterator.hasNext() is used.
        """
        real_batch = next(iter_dataloader)

        if isinstance(real_batch, (tuple, list)):  # (image, label)
            real_batch = real_batch[0]

        return iter_dataloader, real_batch
def _fetch_data ( self , iter_dataloader ) : real_batch = next ( iter_dataloader ) if isinstance ( real_batch , ( tuple , list ) ) : # (image, label) real_batch = real_batch [ 0 ] return iter_dataloader , real_batch