(self, batch, batch_idx, postfix="")
| 142 | return log_dict |
| 143 | |
| 144 | def _validation_step(self, batch, batch_idx, postfix=""): |
| 145 | inputs = self.get_input(batch, self.image_key) |
| 146 | reconstructions, posterior = self(inputs) |
| 147 | aeloss, log_dict_ae = self.loss(inputs, reconstructions, posterior, 0, self.global_step, |
| 148 | last_layer=self.get_last_layer(), split="val"+postfix) |
| 149 | |
| 150 | discloss, log_dict_disc = self.loss(inputs, reconstructions, posterior, 1, self.global_step, |
| 151 | last_layer=self.get_last_layer(), split="val"+postfix) |
| 152 | |
| 153 | self.log(f"val{postfix}/rec_loss", log_dict_ae[f"val{postfix}/rec_loss"]) |
| 154 | self.log_dict(log_dict_ae) |
| 155 | self.log_dict(log_dict_disc) |
| 156 | return self.log_dict |
| 157 | |
| 158 | def configure_optimizers(self): |
| 159 | lr = self.learning_rate |
no test coverage detected