MCPcopy Create free account
hub / github.com/CausalLearning/robust-unlearnable-examples / _make_layer

Method _make_layer

models/resnet.py:125–132  ·  view source on GitHub ↗
(self, block, planes, num_blocks, stride)

Source from the content-addressed store, hash-verified

123 self.linear = nn.Linear(64*wide, out_dims)
124
125 def _make_layer(self, block, planes, num_blocks, stride):
126 strides = [stride] + [1]*(num_blocks-1)
127 layers = []
128 for stride in strides:
129 layers.append(block(self.in_planes, planes, stride, self.wide))
130 self.in_planes = planes * self.wide * block.expansion
131
132 return nn.Sequential(*layers)
133
134 def forward(self, x):
135 out = F.relu(self.bn1(self.conv1(x)))

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected