[Pytorch] Tips for Loading Pre-trained Model
The following errors may occur while loading a pre-trained model. RuntimeError: Error(s) in loading state_dict for model: Missing key(s) in state_dict: ~~~~ Unexpected key(s) in state_dict: ~~~~ Occurs when the key is not sufficient or the key name does not match. Setting "strict" as "false" can easily resolve this error. model.load_state_dict(checkpoint, strict=False) For more detail check docu..