I got a quick question about ResNet, i don’t really get the idea behind how to define that we want 20 stacked, or 32 stacked layers for example
return ResNet(BasicBlock, [3, 3, 3])
return ResNet(BasicBlock, [5, 5, 5])
why [3,3,3] for resnet20 and [5,5,5] for resnet32, exactly what those numbers do?
Hi @Kaneda, from the code it looks like the [3,3,3] or the [5,5,5] is an argument “num_blocks” to the function _make_layer which is being used to decide strides for different layers.
def _make_layer(self, block, planes, num_blocks, stride):
strides = [stride] + *(num_blocks-1)
layers = 
for stride in strides:
layers.append(block(self.in_planes, planes, stride))
self.in_planes = planes * block.expansion