(self, load_path)
| 262 | self.print_fn(f"model saved: {save_filename}") |
| 263 | |
| 264 | def load_model(self, load_path): |
| 265 | checkpoint = torch.load(load_path) |
| 266 | |
| 267 | self.model.load_state_dict(checkpoint['model']) |
| 268 | self.optimizer.load_state_dict(checkpoint['optimizer']) |
| 269 | self.scheduler.load_state_dict(checkpoint['scheduler']) |
| 270 | self.it = checkpoint['it'] |
| 271 | self.ema_model.load_state_dict(checkpoint['ema_model']) |
| 272 | self.print_fn('model loaded') |
| 273 | |
| 274 | # Abandoned in Pseudo Label |
| 275 | def interleave_offsets(self, batch, nu): |