Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
15
def
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
25
def
test_ToMode():
Callers
9
test_ToMode
Function · 0.85
test_CenterCrop
Function · 0.85
test_ColorJitter
Function · 0.85
test_RandomHorizontalFlip
Function · 0.85
test_RandomVerticalFlip
Function · 0.85
test_RandomResizedCrop
Function · 0.85
test_Normalize
Function · 0.85
test_RandomCrop
Function · 0.85
test_Compose
Function · 0.85
Calls
1
astype
Method · 0.45
Tested by
no test coverage detected