Currently, I have to define the  initial

self.conv1 = nn.Conv2d(3, 24, kernel_size=1, bias=False)
self.bn1 = nn.BatchNorm2d(24)
self.conv2 = nn.Conv2d(mid_planes, out_planes, kernel_size=1, groups=groups, bias=False)

and corresponding forward pass as

out = F.relu(self.bn1(self.conv1(x)))
out = F.conv2(out)
out = out + x

Currently, I have 2 convolutions, what happen if I want to have a flexible number of convolution layers in my network?. Let’s say 15 convolutions layers.
Is there any easy way to do it, rather than hand naming as conv1, …, conv15.