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

Function generate_data

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

Source from the content-addressed store, hash-verified

13
14
15def generate_data():
16 return [
17 (
18 (np.random.rand(*data_shape) * 255).astype(np.uint8),
19 np.random.randint(10, size=label_shape),
20 )
21 for _ in range(*label_shape)
22 ]
23
24
25def test_ToMode():

Callers 9

test_ToModeFunction · 0.85
test_CenterCropFunction · 0.85
test_ColorJitterFunction · 0.85
test_RandomVerticalFlipFunction · 0.85
test_RandomResizedCropFunction · 0.85
test_NormalizeFunction · 0.85
test_RandomCropFunction · 0.85
test_ComposeFunction · 0.85

Calls 1

astypeMethod · 0.45

Tested by

no test coverage detected