I’m having hard time to completely understand the make_layer method here. Could someone please help me with a bit more clarification?
def _make_layer(block,inplanes,planes, blocks, stride=1):
    downsample = None
    if stride != 1 or inplanes != planes:
        downsample = nn.Sequential(
            nn.Conv2d(inplanes, planes, 1, stride, bias=False),
            nn.BatchNorm2d(planes),
        )
    layers = []
    layers.append(block(inplanes, planes, stride, downsample))
    inplanes = planes
    for _ in range(1, blocks):
        layers.append(block(inplanes, planes))
    return nn.Sequential(*layers)

https://jarvislabs.ai/blogs/resnet

Screen Shot 2021-08-27 at 12.15.08 AM1884×1028 147 KB