John_J_Watson:

when I try the Identity method you have suggested, my outputs are way smaller (1280 for mobilenet, which is the size of the classfier input) - but the output of the (2): ReLU6(inplace=True)  when I do self. pt_model=self.pt_model.features seems 20480. Bizzare!


That’s exactly the difference between reusing a submodule (features in this case) and replacing just the classifier while keeping the forward method.
As you can see in this line of code 2 a functional pooling is applied, which will reduce the spatial size of the activation and reshape it.
I cannot say which approach is the right one, so you might want to run some experiments with and without the pooling.