(self, batch, cond)
| 161 | self.save() |
| 162 | |
| 163 | def run_step(self, batch, cond): |
| 164 | self.forward_backward(batch, cond) |
| 165 | took_step = self.mp_trainer.optimize(self.opt) |
| 166 | if took_step: |
| 167 | self._update_ema() |
| 168 | self._anneal_lr() |
| 169 | self.log_step() |
| 170 | |
| 171 | if self.step % 5000 == 0: |
| 172 | self._sample_and_visualize() |
| 173 | |
| 174 | def _sample_and_visualize(self): |
| 175 | print("Sampling and visualizing...") |
no test coverage detected