In your code snippet it seems you are creating model_encoder as the nn.Module class, not an object of your actual model definition.
To properly load it, you would need to create the object first and then call .load_state_dict() on it:
model_encoder = MyModelEncoder(my_arguments)
model_encoder.load_state_dict(torch.load(...))