remove the point representing inf at n=0
(self)
| 231 | self.check_dim() |
| 232 | |
| 233 | def remove_point_at_inf(self): |
| 234 | """ |
| 235 | remove the point representing inf at n=0 |
| 236 | """ |
| 237 | if not self.included_point_at_inf: |
| 238 | return |
| 239 | |
| 240 | b = self.xyz_w.size(0) |
| 241 | for name in self.attr_names: |
| 242 | arr = getattr(self, name, None) |
| 243 | if arr is None: |
| 244 | continue |
| 245 | arr_requires_grad = arr.requires_grad |
| 246 | arr = arr[:, 1:] |
| 247 | arr.requires_grad = arr_requires_grad |
| 248 | setattr(self, name, arr) |
| 249 | self.included_point_at_inf = False |
| 250 | self.check_dim() |
| 251 | |
| 252 | def state_dict(self) -> T.Dict[str, T.Any]: |
| 253 | """Returns a dictionary that can be saved or load.""" |
no test coverage detected