MCPcopy Index your code
hub / github.com/InternRobotics/EmbodiedScan / to

Method to

embodiedscan/structures/points/base_points.py:429–442  ·  view source on GitHub ↗

Convert current points to a specific device. Args: device (str or :obj:`torch.device`): The name of the device. Returns: :obj:`BasePoints`: A new points object on the specific device.

(self, device: Union[str, torch.device], *args,
           **kwargs)

Source from the content-addressed store, hash-verified

427 return self.tensor.numpy()
428
429 def to(self, device: Union[str, torch.device], *args,
430 **kwargs) -> 'BasePoints':
431 """Convert current points to a specific device.
432
433 Args:
434 device (str or :obj:`torch.device`): The name of the device.
435
436 Returns:
437 :obj:`BasePoints`: A new points object on the specific device.
438 """
439 original_type = type(self)
440 return original_type(self.tensor.to(device, *args, **kwargs),
441 points_dim=self.points_dim,
442 attribute_dims=self.attribute_dims)
443
444 def cpu(self) -> 'BasePoints':
445 """Convert current points to cpu device.

Callers 15

__init__Method · 0.45
cornersMethod · 0.45
bbox3d2resultFunction · 0.45
new_pointMethod · 0.45
processMethod · 0.45
processMethod · 0.45
transformMethod · 0.45
get_targetsMethod · 0.45
get_targetsMethod · 0.45
pre_decoderMethod · 0.45
lossMethod · 0.45
predictMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected