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

Function init_dataset

imperative/python/test/unit/data/test_dataloader.py:40–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def init_dataset():
41 sample_num = 100
42 rand_data = np.random.randint(0, 255, size=(sample_num, 1, 32, 32), dtype=np.uint8)
43 label = np.random.randint(0, 10, size=(sample_num,), dtype=int)
44 dataset = ArrayDataset(rand_data, label)
45 return dataset
46
47
48def test_dataloader_init():

Calls 1

ArrayDatasetClass · 0.90

Tested by

no test coverage detected