(self, x, bboxes=None)
| 411 | self.post_act = get_head_act(cfg.MODEL.HEAD_ACT) |
| 412 | |
| 413 | def forward(self, x, bboxes=None): |
| 414 | x = self.model(x) |
| 415 | if self.detection_mode: |
| 416 | x = self.detection_head(x, bboxes) |
| 417 | x = self.post_act(x) |
| 418 | else: |
| 419 | # Performs fully convlutional inference. |
| 420 | if not self.training: |
| 421 | x = self.post_act(x) |
| 422 | x = x.mean([2, 3, 4]) |
| 423 | x = x.view(x.shape[0], -1) |
| 424 | return x |
| 425 | |
| 426 | |
| 427 | @MODEL_REGISTRY.register() |
nothing calls this directly
no outgoing calls
no test coverage detected