(self, tensor_list: NestedTensor)
| 80 | self.body = IntermediateLayerGetter(backbone, return_layers=return_layers) |
| 81 | |
| 82 | def forward(self, tensor_list: NestedTensor): |
| 83 | xs = self.body(tensor_list.tensors) |
| 84 | out: Dict[str, NestedTensor] = {} |
| 85 | for name, x in xs.items(): |
| 86 | m = tensor_list.mask |
| 87 | assert m is not None |
| 88 | mask = F.interpolate(m[None].float(), size=x.shape[-2:]).to(torch.bool)[0] |
| 89 | out[name] = NestedTensor(x, mask) |
| 90 | return out |
| 91 | |
| 92 | |
| 93 | class Backbone(BackboneBase): |
nothing calls this directly
no test coverage detected