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

Method to

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

Source from the content-addressed store, hash-verified

122 return self.valid_mask[bidx, :].sum().detach().cpu().item()
123
124 def to(self, device: torch.device) -> 'PointCloud':
125 for attr_name in self.attr_names:
126 arr = getattr(self, attr_name, None)
127 if arr is not None:
128 setattr(self, attr_name, arr.to(device=device))
129 return self
130
131 def detach(self) -> 'PointCloud':
132 for attr_name in self.attr_names:

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected