MCPcopy Create free account
hub / github.com/NVIDIA/DALI / make_torch_tensor

Function make_torch_tensor

dali/test/python/test_external_source_impl.py:94–96  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

92 global random_array
93
94 def make_torch_tensor(*args, **kwargs):
95 t = torch.tensor(*args, **kwargs)
96 return t.cuda() if gpu else t
97
98 def torch_cast(x, dtype):
99 return x.type(dtype)

Callers 1

random_arrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected