(self, epoch)
| 35 | self._run_batch(source, targets) |
| 36 | |
| 37 | def _save_checkpoint(self, epoch): |
| 38 | ckp = self.model.state_dict() |
| 39 | PATH = "checkpoint.pt" |
| 40 | torch.save(ckp, PATH) |
| 41 | print(f"Epoch {epoch} | Training checkpoint saved at {PATH}") |
| 42 | |
| 43 | def train(self, max_epochs: int): |
| 44 | for epoch in range(max_epochs): |