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

Class Simple

imperative/python/test/integration/test_param_pack.py:16–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
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:
25 x = x * p
26 return x
27
28
29@pytest.mark.require_ngpu(2)

Callers 1

workerFunction · 0.70

Calls

no outgoing calls

Tested by 1

workerFunction · 0.56