(self, batch, batch_idx)
| 149 | return discloss |
| 150 | |
| 151 | def validation_step(self, batch, batch_idx): |
| 152 | inputs = self.get_input(batch, self.image_key) |
| 153 | reconstructions, posterior = self(inputs) |
| 154 | aeloss, log_dict_ae = self.loss(inputs, reconstructions, posterior, 0, self.global_step, |
| 155 | last_layer=self.get_last_layer(), split="val") |
| 156 | |
| 157 | discloss, log_dict_disc = self.loss(inputs, reconstructions, posterior, 1, self.global_step, |
| 158 | last_layer=self.get_last_layer(), split="val") |
| 159 | |
| 160 | self.log("val/rec_loss", log_dict_ae["val/rec_loss"]) |
| 161 | self.log_dict(log_dict_ae) |
| 162 | self.log_dict(log_dict_disc) |
| 163 | return self.log_dict |
| 164 | |
| 165 | def configure_optimizers(self): |
| 166 | lr = self.learning_rate |
nothing calls this directly
no test coverage detected