code/src/trainer.py [869:888]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            'lm_optimizer': self.lm_optimizer,
            'epoch': self.epoch,
            'n_total_iter': self.n_total_iter,
            'metrics_best': self.metrics_best,
            'crit_best': self.crit_best,
        }
        path = os.path.join(self.params.dump_path, 'checkpoint.pth')
        logger.info("Saving checkpoint to %s ..." % path)
        torch.save(data, path)

    def reload_checkpoint(self):
        """
        Reload a checkpoint if we find one.
        """
        # reload checkpoint
        path = os.path.join(self.params.dump_path, 'checkpoint.pth')
        if not os.path.isfile(path):
            return
        logger.warning('Reloading checkpoint from %s ...' % path)
        data = torch.load(path)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



code/src/trainer.py [1190:1209]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            'lm_optimizer': self.lm_optimizer,
            'epoch': self.epoch,
            'n_total_iter': self.n_total_iter,
            'metrics_best': self.metrics_best,
            'crit_best': self.crit_best,
        }
        path = os.path.join(self.params.dump_path, 'checkpoint.pth')
        logger.info("Saving checkpoint to %s ..." % path)
        torch.save(data, path)

    def reload_checkpoint(self):
        """
        Reload a checkpoint if we find one.
        """
        # reload checkpoint
        path = os.path.join(self.params.dump_path, 'checkpoint.pth')
        if not os.path.isfile(path):
            return
        logger.warning('Reloading checkpoint from %s ...' % path)
        data = torch.load(path)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



