Extract weights of specific module from pretrained model file

The .pth file contains a sorted dictionary. Keys are sorted the same way you called them while instantiating the model.
This basically means if you call model.backbone.state_dict().keys() you should get which ones correspond to the backbone.
Then you just get them from the pth file.