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

Method __init__

imperative/python/test/integration/test_param_pack.py:17–21  ·  view source on GitHub ↗
(self, param_shape)

Source from the content-addressed store, hash-verified

15
16class Simple(Module):
17 def __init__(self, param_shape):
18 super().__init__()
19 self.params = [
20 Parameter(np.ones(param_shape), dtype=np.float32) for i in range(10)
21 ]
22
23 def forward(self, x):
24 for p in self.params:

Callers

nothing calls this directly

Calls 2

ParameterClass · 0.90
onesMethod · 0.80

Tested by

no test coverage detected