Predict the SDF at the coordinates x, given a batch of point clouds. Either point_clouds or encoded should be passed. Only exactly one of these arguments should be None. :param x: a [batch x 3 x N'] tensor of query points. :param point_clouds: a [batch x 3
(
self,
x: torch.Tensor,
point_clouds: Optional[torch.Tensor] = None,
encoded: Optional[Dict[str, torch.Tensor]] = None,
)
| 35 | """ |
| 36 | |
| 37 | def forward( |
| 38 | self, |
| 39 | x: torch.Tensor, |
| 40 | point_clouds: Optional[torch.Tensor] = None, |
| 41 | encoded: Optional[Dict[str, torch.Tensor]] = None, |
| 42 | ) -> torch.Tensor: |
| 43 | """ |
| 44 | Predict the SDF at the coordinates x, given a batch of point clouds. |
| 45 | |
| 46 | Either point_clouds or encoded should be passed. Only exactly one of |
| 47 | these arguments should be None. |
| 48 | |
| 49 | :param x: a [batch x 3 x N'] tensor of query points. |
| 50 | :param point_clouds: a [batch x 3 x N] batch of point clouds. |
| 51 | :param encoded: the result of calling encode_point_clouds(). |
| 52 | :return: a [batch x N'] tensor of SDF predictions. |
| 53 | """ |
| 54 | assert point_clouds is not None or encoded is not None |
| 55 | assert point_clouds is None or encoded is None |
| 56 | if point_clouds is not None: |
| 57 | encoded = self.encode_point_clouds(point_clouds) |
| 58 | return self.predict_sdf(x, encoded) |
| 59 | |
| 60 | @abstractmethod |
| 61 | def predict_sdf( |
nothing calls this directly
no test coverage detected