Method
test_step
(self, batch, batch_idx, dataloader_idx)
Source from the content-addressed store, hash-verified
| 50 | |
| 51 | @torch.no_grad() |
| 52 | def test_step(self, batch, batch_idx, dataloader_idx): |
| 53 | pred = self.model(batch) |
| 54 | pred["pred"] = torch.argmax(pred["logits"], dim=2) |
| 55 | self.test_metrics[self.domain_dict[dataloader_idx]].update(pred["pred"], batch["gt"]) |
| 56 | |
| 57 | def on_test_epoch_end(self): |
| 58 | for dataloader_idx in ['out', 'in']: |
Callers
nothing calls this directly
Tested by
no test coverage detected