MCPcopy Create free account
hub / github.com/apple/ml-pointersect / to

Method to

pointersect/inference/structures.py:1289–1296  ·  view source on GitHub ↗
(self, device: torch.device)

Source from the content-addressed store, hash-verified

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."""

Callers 1

intersect_pcd_and_rayFunction · 0.95

Calls 1

toMethod · 0.45

Tested by

no test coverage detected