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

Function single_2d_transform_cases

tests/transforms/functional/test_apply.py:25–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def single_2d_transform_cases():
26 return [
27 (
28 torch.as_tensor(get_arange_img((32, 32))),
29 [{LazyAttr.AFFINE: create_rotate(2, np.pi / 4)}, {LazyAttr.AFFINE: create_rotate(2, -np.pi / 4)}],
30 (1, 32, 32),
31 ),
32 (torch.as_tensor(get_arange_img((32, 32))), [create_rotate(2, np.pi / 2)], (1, 32, 32)),
33 (
34 torch.as_tensor(get_arange_img((16, 16))),
35 [{LazyAttr.AFFINE: create_rotate(2, np.pi / 2), LazyAttr.SHAPE: (45, 45)}],
36 (1, 45, 45),
37 ),
38 ]
39
40
41class TestApply(unittest.TestCase):

Callers 1

TestApplyClass · 0.85

Calls 3

get_arange_imgFunction · 0.90
create_rotateFunction · 0.90
as_tensorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…