| 24 | |
| 25 | |
| 26 | class ExampleModel(nn.Module): |
| 27 | |
| 28 | def __init__(self): |
| 29 | super(ExampleModel, self).__init__() |
| 30 | self.test_cfg = None |
| 31 | self.conv = nn.Conv2d(3, 3, 3) |
| 32 | |
| 33 | def forward(self, img, img_metas, test_mode=False, **kwargs): |
| 34 | return img |
| 35 | |
| 36 | def train_step(self, data_batch, optimizer): |
| 37 | loss = self.forward(**data_batch) |
| 38 | return dict(loss=loss) |
| 39 | |
| 40 | |
| 41 | def test_iter_eval_hook(): |
no outgoing calls