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

Method __init__

imperative/python/test/integration/test_grad_detach.py:12–15  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10
11class Simple(Module):
12 def __init__(self):
13 super().__init__()
14 self.a = Parameter([1.0], dtype=np.float32)
15 self.b = Parameter([1.0], dtype=np.float32)
16
17 def forward(self, x):
18 x = x * self.a

Callers

nothing calls this directly

Calls 1

ParameterClass · 0.90

Tested by

no test coverage detected