(self, device: torch.device)
| 1287 | ] |
| 1288 | |
| 1289 | def to(self, device: torch.device) -> 'PointersectRecord': |
| 1290 | for attr_name in self.attr_names: |
| 1291 | if attr_name == 'model_info': |
| 1292 | continue |
| 1293 | arr = getattr(self, attr_name, None) |
| 1294 | if arr is not None: |
| 1295 | setattr(self, attr_name, arr.to(device=device)) |
| 1296 | return self |
| 1297 | |
| 1298 | def state_dict(self) -> T.Dict[str, T.Any]: |
| 1299 | """Returns a dictionary that can be saved or load.""" |
no test coverage detected