MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / forward

Method forward

models/aios/backbones/backbone.py:74–83  ·  view source on GitHub ↗
(self, tensor_list: NestedTensor)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

NestedTensorClass · 0.90
itemsMethod · 0.45
toMethod · 0.45

Tested by

no test coverage detected