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

Method __init__

imperative/python/test/unit/module/test_module.py:54–59  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

52 return self.bn(x)
53
54 def __init__(self):
55 super().__init__()
56 self.i = self.InnerModule()
57 self.bn = BatchNorm2d(4)
58 self.param = Parameter(np.ones(1, dtype=np.float32))
59 self.buff = Tensor(np.ones(1, dtype=np.float32))
60
61 def forward(self, x):
62 x = self.i(x)

Callers

nothing calls this directly

Calls 5

BatchNorm2dClass · 0.90
ParameterClass · 0.90
TensorClass · 0.90
onesMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected