Yes, the issue is raised, since you are changing the model definition from a custom module using the self.encoder and self.classifier submodules to a sequential module.
One fix would be to rename the keys in the state_dict. However, I’m currently unsure, if you really need to change the model definition or if it would be possible to use the custom model definition.
Could you explain your use case a bit more and why you are rewrapping the submodules in an nn.Sequential container?