I haven’t tried this before, but I wonder if this simple approach would work:

add two members to your model definition self.start_layer, self.end_layer

build a mapping from layer indices to the layer member in your model e.g., self.layers = {1:self.conv1, 2:self.conv2,...}

edit the forward function to be something like

def forward(self, x):
    for i in range(self.start_layer, self.end_layer+1):
        x = self.layers[i](x)
    return x

Then you just need to do something like model.start_layer = ? and model.end_layer=? to set up how you want to use your model each time.