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

Method _make_layer

imperative/python/test/integration/test_dtr.py:74–81  ·  view source on GitHub ↗
(self, block, planes, num_blocks, stride)

Source from the content-addressed store, hash-verified

72 self.apply(_weights_init)
73
74 def _make_layer(self, block, planes, num_blocks, stride):
75 strides = [stride] + [1] * (num_blocks - 1)
76 layers = []
77 for stride in strides:
78 layers.append(block(self.in_planes, planes, stride))
79 self.in_planes = planes * block.expansion
80
81 return M.Sequential(*layers)
82
83 def forward(self, x):
84 out = F.relu(self.bn1(self.conv1(x)))

Callers 1

__init__Method · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected