torchtnt.utils.device.copy_data_to_device¶
-
torchtnt.utils.device.
copy_data_to_device
(data: T, device: device, *args: Any, **kwargs: Any) T ¶ Function that recursively copies data to a torch.device.
Parameters: - data – The data to copy to device
- device – The device to which the data should be copied
- args – positional arguments that will be passed to the to call
- kwargs – keyword arguments that will be passed to the to call
Returns: The data on the correct device