(self, train_dl)
| 44 | self.tensorboard_folder = config.tensorboard_folder |
| 45 | |
| 46 | def init_batch_sampler(self, train_dl): |
| 47 | # Copy of the batch sampler from the DataLoader |
| 48 | self.batch_sampler = train_dl.batch_sampler.copy() |
| 49 | # Iterator for the batch sampler |
| 50 | self.batch_sampler_iter = iter(self.batch_sampler) |
| 51 | |
| 52 | def __str__(self) -> str: |
| 53 | """Returns a string representation of the training state in JSON format.""" |