MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / test_RandomCrop

Function test_RandomCrop

imperative/python/test/unit/data/test_transform.py:81–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79
80
81def test_RandomCrop():
82 t = RandomCrop((150, 120), padding_size=10, padding_value=[1, 2, 3])
83 aug_data = t.apply_batch(generate_data())
84 aug_data_shape = [(a.shape, b.shape) for a, b in aug_data]
85 target_shape = [((150, 120, 3), label_shape)] * 4
86 assert aug_data_shape == target_shape
87
88
89def test_Compose():

Callers

nothing calls this directly

Calls 3

RandomCropClass · 0.85
generate_dataFunction · 0.85
apply_batchMethod · 0.45

Tested by

no test coverage detected