I’m not familiar with the code base and am not sure, how the model is supposed to work, but you could use forward hooks to check, which layer is being called:
model = DenseBlockEncoder(1, 3)

def print_layer(name):
    def hook(model, input, output):
        print("{} called".format(name))
    return hook    
    
for idx in range(len(model.layers)):
    model.layers[idx].register_forward_hook(print_layer(str(idx)))

x = torch.randn(1, 1, 4, 4)
model(x)
> 0 called

In this example, only the first sequential block is being called.