(self, mode="sum")
| 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] |
nothing calls this directly
no outgoing calls
no test coverage detected