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

Method to

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

Source from the content-addressed store, hash-verified

2186 return rgbd_images
2187
2188 def to(self, device: torch.device) -> 'RGBDImage':
2189 for attr_name in ['rgb', 'depth', 'normal_w', 'hit_map', 'camera', 'feature']:
2190 arr = getattr(self, attr_name, None)
2191 if arr is not None:
2192 setattr(self, attr_name, arr.to(device=device))
2193 return self
2194
2195 def detach(self) -> 'RGBDImage':
2196 for attr_name in ['rgb', 'depth', 'normal_w', 'hit_map', 'camera', 'feature']:

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected