Solved by ptrblck in post #3 
              
              
                Have a look at the resnet implementation in torchvision. 
In particular the definition of BasicBlock and Bottleneck might be helpful.