MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / data_from_keys

Function data_from_keys

tests/transforms/compose/test_compose.py:31–38  ·  view source on GitHub ↗
(keys, h, w)

Source from the content-addressed store, hash-verified

29
30
31def data_from_keys(keys, h, w):
32 if keys is None:
33 data = torch.arange(h * w).reshape(1, h, w)
34 else:
35 data = {}
36 for i_k, k in enumerate(keys):
37 data[k] = torch.arange(h * w).reshape(1, h, w).mul_(i_k * h * w)
38 return data
39
40
41class _RandXform(Randomizable):

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…