Method
_make_layer
(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))) |
Tested by
no test coverage detected