The forward method is independent from the state_dict and you should be able to manipulate this method as you wish.
state_dict = torch.load(path_to_state_dict) will only load all parameters and buffers in an OrderedDict without any knowledge about the forward method.
Do you see any error using this approach?