MCPcopy Create free account
hub / github.com/coperception/star / fusion

Method fusion

star/models/mae_base.py:624–633  ·  view source on GitHub ↗
(self, mode="sum")

Source from the content-addressed store, hash-verified

622 self.neighbor_feat_list.append(warp_feat)
623
624 def fusion(self, mode="sum"):
625 # add all the features point wise
626 # print("len of nb feat list", len(self.neighbor_feat_list))
627 fused = torch.sum(torch.stack(self.neighbor_feat_list), dim=0)
628 if mode == "union":
629 fused[fused>0.] = 1.0
630 if mode == "sum":
631 fused[fused>=0.5] = 1.0
632 fused[fused<0.5] = 0.0
633 return fused
634
635 # Question: this can be done by a view or reshape?
636 # shaped like: [ (batch_agent1, batch_agent2, ...) , channel, h, w]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected