(self, load_path)
| 230 | self.print_fn(f"model saved: {save_filename}") |
| 231 | |
| 232 | def load_model(self, load_path): |
| 233 | checkpoint = torch.load(load_path) |
| 234 | |
| 235 | self.model.load_state_dict(checkpoint['model']) |
| 236 | self.optimizer.load_state_dict(checkpoint['optimizer']) |
| 237 | self.scheduler.load_state_dict(checkpoint['scheduler']) |
| 238 | self.it = checkpoint['it'] |
| 239 | self.ema_model.load_state_dict(checkpoint['ema_model']) |
| 240 | self.print_fn('model loaded') |
| 241 | |
| 242 | # Abandoned in PiModel |
| 243 | def interleave_offsets(self, batch, nu): |