MCPcopy Create free account
hub / github.com/ElliotVincent/SitsSCD / test_step

Method test_step

models/module.py:52–55  ·  view source on GitHub ↗
(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

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected