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

Class Simple

imperative/python/test/unit/utils/test_dump_naming.py:38–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36@pytest.mark.parametrize("symbolic", [False, True])
37def test_auto_naming(symbolic):
38 class Simple(M.Module):
39 def __init__(self, name):
40 super().__init__()
41 self.name = name
42
43 def forward(self, x):
44 return x + x
45
46 m = Simple("simple")
47 op = _dump_and_load(m, symbolic)[-1]

Calls

no outgoing calls

Tested by 11

test_auto_namingFunction · 0.56
test_user_named_tensorFunction · 0.56
test_user_named_paramFunction · 0.56
test_ignore_top_moduleFunction · 0.56
test_with_submoduleFunction · 0.56
test_named_submoduleFunction · 0.56
test_with_same_operatorsFunction · 0.56