def advance_phase(self):
    'Performs bookkeeping / task updates between phases\n\n        Increments phase idx, resets meters, resets loss history,\n        resets counters, shuffles dataset, rebuilds iterators, and\n        sets the train / test state for phase.\n        '
    logging.debug('Advancing phase')
    for meter in self.meters:
        meter.reset()
    self.losses = []
    self.phase_idx += 1
    phase = self.phases[self.phase_idx]
    self.train = (True if phase['train'] else False)
    if self.train:
        self.train_phase_idx += 1
    self.build_dataloaders_for_current_phase()
    self.create_data_iterators()
    self._set_model_train_mode()
Performs bookkeeping / task updates between phases

Increments phase idx, resets meters, resets loss history,
resets counters, shuffles dataset, rebuilds iterators, and
sets the train / test state for phase.
def advance_phase(self):
    'Performs bookkeeping / task updates between phases\n\n        Increments phase idx, resets meters, resets loss history,\n        resets counters, shuffles dataset, rebuilds iterators, and\n        sets the train / test state for phase.\n        '
    logging.debug('Advancing phase')
    for meter in self.meters:
        meter.reset()
    self.losses = []
    self.phase_idx += 1
    phase = self.phases[self.phase_idx]
    self.train = (True if phase['train'] else False)
    if self.train:
        self.train_phase_idx += 1
    self.build_dataloaders_for_current_phase()
    self.create_data_iterators()
    self._set_model_train_mode()