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

Class MLP

imperative/python/test/unit/module/test_module.py:32–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31
32class MLP(Module):
33 def __init__(self):
34 super().__init__()
35 self.dense0 = Linear(28, 50)
36 self.dense1 = Linear(50, 20)
37
38 def forward(self, x):
39 x = self.dense0(x)
40 x = F.relu(x)
41 x = self.dense1(x)
42 return x
43
44
45class MyModule(Module):

Callers 2

test_state_dictFunction · 0.70
test_pickle_moduleFunction · 0.70

Calls

no outgoing calls

Tested by 2

test_state_dictFunction · 0.56
test_pickle_moduleFunction · 0.56