MCPcopy
hub / github.com/alibaba/EasyCV / to

Method to

easycv/core/points/base_points.py:380–394  ·  view source on GitHub ↗

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

(self, device)

Source from the content-addressed store, hash-verified

378 return cat_points
379
380 def to(self, device):
381 """Convert current points to a specific device.
382
383 Args:
384 device (str | :obj:`torch.device`): The name of the device.
385
386 Returns:
387 :obj:`BasePoints`: A new boxes object on the
388 specific device.
389 """
390 original_type = type(self)
391 return original_type(
392 self.tensor.to(device),
393 points_dim=self.points_dim,
394 attribute_dims=self.attribute_dims)
395
396 def clone(self):
397 """Clone the Points.

Callers 15

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
count_flopFunction · 0.45
mainFunction · 0.45
obj2tensorFunction · 0.45
gaussianBlurDynamicFunction · 0.45
gaussianBlurFunction · 0.45
torchacc_cudaFunction · 0.45
_jit_forwardMethod · 0.45
__init__Method · 0.45
detectMethod · 0.45

Calls

no outgoing calls