MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / to

Method to

util/misc.py:393–402  ·  view source on GitHub ↗
(self, device)

Source from the content-addressed store, hash-verified

391 return res
392
393 def to(self, device):
394 # type: (Device) -> NestedTensor # noqa
395 cast_tensor = self.tensors.to(device)
396 mask = self.mask
397 if mask is not None:
398 assert mask is not None
399 cast_mask = mask.to(device)
400 else:
401 cast_mask = None
402 return NestedTensor(cast_tensor, cast_mask)
403
404 def to_img_list_single(self, tensor, mask):
405 assert tensor.dim() == 3, 'dim of tensor should be 3 but {}'.format(

Callers 15

mainFunction · 0.45
mask_sampleFunction · 0.45
__call__Method · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
build_aios_smplxFunction · 0.45

Calls 1

NestedTensorClass · 0.85

Tested by

no test coverage detected