Solved by Skinish in post #6 
              
              
                I don’t know why but my previous post disappeared. Therefore, I am posting the solution once again: 
def load_weights(self):
    pretrained_dict = torch.load('model.torch')
    model_dict = self.state_dict()

    # 1. filter out unnecessary keys
    pretrained_dict = {k: v for k, v in pretrained_dic…