(self, inputs)
| 99 | self.mlp = SharedMLP(in_channels=in_channels, out_channels=out_channels, dim=1) |
| 100 | |
| 101 | def forward(self, inputs): |
| 102 | if len(inputs) == 3: |
| 103 | points_coords, centers_coords, centers_features, temb = inputs |
| 104 | points_features = None |
| 105 | else: |
| 106 | points_coords, centers_coords, centers_features, points_features, temb = inputs |
| 107 | interpolated_features = F.nearest_neighbor_interpolate(points_coords, centers_coords, centers_features) |
| 108 | interpolated_temb = F.nearest_neighbor_interpolate(points_coords, centers_coords, temb) |
| 109 | if points_features is not None: |
| 110 | interpolated_features = torch.cat( |
| 111 | [interpolated_features, points_features], dim=1 |
| 112 | ) |
| 113 | return self.mlp(interpolated_features), points_coords, interpolated_temb |
nothing calls this directly
no outgoing calls
no test coverage detected