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

Function make_sample_tensor

dali/test/python/torchvision/test_tv_normalize.py:34–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def make_sample_tensor():
35 # 3x2x2 (C, H, W)
36 return torch.tensor(
37 [
38 [[1.0, 2.0], [3.0, 4.0]],
39 [[5.0, 6.0], [7.0, 8.0]],
40 [[9.0, 10.0], [11.0, 12.0]],
41 ]
42 )
43
44
45def test_normalize_core(

Calls

no outgoing calls

Tested by

no test coverage detected