Currently, load_state_dict works only when the loaded state_dict and the Module's state_dict match exactly.
Problem: For the purpose of fine-tuning or for any slight change in the network, it is not straightforward to load the base layers, leaving one or two unchanged. Either we have to define the old network, load the state and then modify the network, or essentially rewrite the load_state_dict function.
Proposed Solution:
def load_state_dict(self, state_dict, ignored_keys=None):
Can I create a PR for the same?