Hello and thanks for the answer.
I am aware of the way you mentioned, but I am looking for something more general that goes through the modules of the residual block in every architecture with residuals, and not specifically for Resnet34 for example.