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

Function init_dataset

imperative/python/test/unit/data/test_pre_dataloader.py:32–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31
32def init_dataset():
33 sample_num = 100
34 rand_data = np.random.randint(0, 255, size=(sample_num, 1, 32, 32), dtype=np.uint8)
35 label = np.random.randint(0, 10, size=(sample_num,), dtype=int)
36 dataset = ArrayDataset(rand_data, label)
37 return dataset
38
39
40def test_dataloader_init():

Calls 1

ArrayDatasetClass · 0.90

Tested by

no test coverage detected