It generally depends on the original implementation, i.e. if the base model was implemented using nn.Sequential (or in a very similar manner), this approach might work.
However, if some functional calls were used in the forward method, you will lose them.
In the example of resnet50, this approach will work, since even the non-linearity is defined as a module.