(self, batch, batch_idx)
| 462 | |
| 463 | @torch.no_grad() |
| 464 | def validation_step(self, batch, batch_idx): |
| 465 | _, loss_dict_no_ema = self.shared_step(batch) |
| 466 | with self.ema_scope(): |
| 467 | _, loss_dict_ema = self.shared_step(batch) |
| 468 | loss_dict_ema = {key + '_ema': loss_dict_ema[key] for key in loss_dict_ema} |
| 469 | self.log_dict(loss_dict_no_ema, prog_bar=False, logger=True, on_step=False, on_epoch=True) |
| 470 | self.log_dict(loss_dict_ema, prog_bar=False, logger=True, on_step=False, on_epoch=True) |
| 471 | |
| 472 | def on_train_batch_end(self, *args, **kwargs): |
| 473 | if self.use_ema: |
nothing calls this directly
no test coverage detected