We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c50379c commit bc08a37Copy full SHA for bc08a37
ding/torch_utils/data_helper.py
@@ -30,6 +30,8 @@ def to_device(item: Any, device: str, ignore_keys: list = []) -> Any:
30
"""
31
if isinstance(item, torch.nn.Module):
32
return item.to(device)
33
+ elif isinstance(item, ttorch.Tensor):
34
+ return item.to(device)
35
elif isinstance(item, torch.Tensor):
36
37
elif isinstance(item, Sequence):
0 commit comments