Solved by Nikronic in post #2 
              
              
                Hi, 
Yes, you are managing it correctly. Just for clarification, this is the two last layer of the model: 
(avgpool): AdaptiveAvgPool3d(output_size=(1, 1, 1))
(fc): Linear(in_features=512, out_features=400, bias=True)

So by your code it will be converted to: 
(avgpool): AdaptiveAvgPool3d(output_siz…