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

Method _make_layer

models/nets/wrn.py:60–65  ·  view source on GitHub ↗
(self, block, in_planes, out_planes, nb_layers, stride, drop_rate, activate_before_residual)

Source from the content-addressed store, hash-verified

58 block, in_planes, out_planes, nb_layers, stride, drop_rate, activate_before_residual)
59
60 def _make_layer(self, block, in_planes, out_planes, nb_layers, stride, drop_rate, activate_before_residual):
61 layers = []
62 for i in range(int(nb_layers)):
63 layers.append(block(i == 0 and in_planes or out_planes, out_planes,
64 i == 0 and stride or 1, drop_rate, activate_before_residual))
65 return nn.Sequential(*layers)
66
67 def forward(self, x):
68 return self.layer(x)

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected