Solved by albanD in post #2 
              
              
                Hi, 
Such chaining of each layer one by one is only expected to work if the original module is a nn.Sequential() as this is how the forward method is implemented here. 
For general modules, you should check how the forward method is implemented to know how they should be used. 
In the case of resnet…