MCPcopy Create free account
hub / github.com/PeizeSun/TransTrack / forward

Method forward

models/backbone.py:82–90  ·  view source on GitHub ↗
(self, tensor_list: NestedTensor)

Source from the content-addressed store, hash-verified

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
93class Backbone(BackboneBase):

Callers

nothing calls this directly

Calls 2

NestedTensorClass · 0.90
toMethod · 0.80

Tested by

no test coverage detected