(self, tensor_list: NestedTensor)
| 72 | self.num_channels = num_channels |
| 73 | |
| 74 | def forward(self, tensor_list: NestedTensor): |
| 75 | xs = self.body(tensor_list.tensors) |
| 76 | out: Dict[str, NestedTensor] = {} |
| 77 | for name, x in xs.items(): |
| 78 | m = tensor_list.mask |
| 79 | assert m is not None |
| 80 | mask = F.interpolate(m[None].float(), |
| 81 | size=x.shape[-2:]).to(torch.bool)[0] |
| 82 | out[name] = NestedTensor(x, mask) |
| 83 | return out |
| 84 | |
| 85 | |
| 86 | class Backbone(BackboneBase): |
nothing calls this directly
no test coverage detected