reset the point representing inf at n=0
(self)
| 207 | self.check_dim() |
| 208 | |
| 209 | def reset_point_at_inf(self): |
| 210 | """ |
| 211 | reset the point representing inf at n=0 |
| 212 | """ |
| 213 | if not self.included_point_at_inf: |
| 214 | return |
| 215 | |
| 216 | with torch.no_grad(): |
| 217 | for name in self.attr_names: |
| 218 | arr = getattr(self, name, None) |
| 219 | if arr is None: |
| 220 | continue |
| 221 | |
| 222 | if name == 'xyz_w': |
| 223 | val = INF |
| 224 | elif name == 'valid_mask': |
| 225 | val = 0 |
| 226 | else: |
| 227 | val = 0 |
| 228 | |
| 229 | arr[:, 0, :] = val |
| 230 | setattr(self, name, arr) |
| 231 | self.check_dim() |
| 232 | |
| 233 | def remove_point_at_inf(self): |
| 234 | """ |