(self, batch, batch_idx)
| 48 | def validation_step(self, batch, batch_idx): |
| 49 | x, y = batch |
| 50 | y_hat = self(x) |
| 51 | loss = F.cross_entropy(y_hat, y) |
| 52 | self.log('val_loss', loss) |
| 53 | |
| 54 | def configure_optimizers(self): |
| 55 | return torch.optim.Adam(self.parameters(), lr=1e-2) |
| 56 | |
| 57 | class TestPytorchLightning(unittest.TestCase): |
nothing calls this directly
no outgoing calls
no test coverage detected