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

Function test_ToMode

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

Source from the content-addressed store, hash-verified

23
24
25def test_ToMode():
26 t = ToMode(mode="CHW")
27 aug_data = t.apply_batch(generate_data())
28 aug_data_shape = [(a.shape, b.shape) for a, b in aug_data]
29 target_shape = [(ToMode_target_shape, label_shape)] * 4
30 assert aug_data_shape == target_shape
31
32
33def test_CenterCrop():

Callers

nothing calls this directly

Calls 3

ToModeClass · 0.85
generate_dataFunction · 0.85
apply_batchMethod · 0.45

Tested by

no test coverage detected