Configure the loop given the settings.
(self, steps_per_epoch, starting_epoch, max_epoch)
| 39 | self._local_step = -1 |
| 40 | |
| 41 | def config(self, steps_per_epoch, starting_epoch, max_epoch): |
| 42 | """ |
| 43 | Configure the loop given the settings. |
| 44 | """ |
| 45 | self.starting_epoch = int(starting_epoch) |
| 46 | self.max_epoch = int(max_epoch) |
| 47 | self.steps_per_epoch = int(steps_per_epoch) |
| 48 | # Allow empty epoch (no steps), if we want to run the callbacks only. |
| 49 | assert self.steps_per_epoch >= 0 and self.max_epoch >= 0 |
| 50 | |
| 51 | self._epoch_num = starting_epoch - 1 |
| 52 | |
| 53 | def update_global_step(self): |
| 54 | """ |