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

Class Simple

imperative/python/test/unit/utils/test_profiler.py:19–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class Simple(Module):
20 def __init__(self):
21 super().__init__()
22 self.a = Parameter([1.23], dtype="float32")
23
24 def forward(self, x):
25 x = x * self.a
26 return x
27
28
29@pytest.mark.parametrize("format", ["chrome_timeline.json", "memory_flow.svg"])

Callers 1

inferFunction · 0.70

Calls

no outgoing calls

Tested by 1

inferFunction · 0.56