(self, batch, batch_idx)
| 492 | return discloss |
| 493 | |
| 494 | def validation_step(self, batch, batch_idx): |
| 495 | inputs = self.get_input(batch, self.image_key) |
| 496 | reconstructions, posterior = self(inputs) |
| 497 | aeloss, log_dict_ae = self.loss(inputs, reconstructions, posterior, 0, self.global_step, |
| 498 | last_layer=self.get_last_layer(), split="val") |
| 499 | |
| 500 | discloss, log_dict_disc = self.loss(inputs, reconstructions, posterior, 1, self.global_step, |
| 501 | last_layer=self.get_last_layer(), split="val") |
| 502 | |
| 503 | self.log("val/rec_loss", log_dict_ae["val/rec_loss"]) |
| 504 | self.log_dict(log_dict_ae) |
| 505 | self.log_dict(log_dict_disc) |
| 506 | return self.log_dict |
| 507 | |
| 508 | def configure_optimizers(self): |
| 509 | lr = self.learning_rate |
nothing calls this directly
no test coverage detected