(self)
| 183 | pass |
| 184 | |
| 185 | def configure_optimizers(self): |
| 186 | opt = torch.optim.Adam(self.parameters(), lr=self.lr, weight_decay=self.weight_decay) |
| 187 | out = dict(optimizer=opt) |
| 188 | if exists(self.lr_scheduler_cfg): |
| 189 | sch = load_partial_from_config(self.lr_scheduler_cfg) |
| 190 | sch = sch(optimizer=opt) |
| 191 | out["lr_scheduler"] = sch |
| 192 | return out |
| 193 | |
| 194 | def forward(self, x1: Tensor, x0: Tensor, **kwargs): |
| 195 | return self.model.training_losses(x1=x1, x0=x0, **kwargs).mean() |
nothing calls this directly
no test coverage detected