(self, inputs)
| 30 | self.mlps = nn.ModuleList(mlps) |
| 31 | |
| 32 | def forward(self, inputs): |
| 33 | features, coords = inputs |
| 34 | if self.include_coordinates: |
| 35 | features = torch.cat([features, coords], dim=1) |
| 36 | coords = torch.zeros((coords.size(0), 3, 1), device=coords.device) |
| 37 | if len(self.mlps) > 1: |
| 38 | features_list = [] |
| 39 | for mlp in self.mlps: |
| 40 | features_list.append(mlp(features).max(dim=-1, keepdim=True).values) |
| 41 | return torch.cat(features_list, dim=1), coords |
| 42 | else: |
| 43 | return self.mlps[0](features).max(dim=-1, keepdim=True).values, coords |
| 44 | |
| 45 | def extra_repr(self): |
| 46 | return f'out_channels={self.out_channels}, include_coordinates={self.include_coordinates}' |
nothing calls this directly
no outgoing calls
no test coverage detected