I am actually borrowing the first few blocks of resnet50 and append a few of m own layers to their rear to create my own model. I need the resnet potion of the model to use pretrained weight, so I load the weights from some url and update the state_dict of my new created model with these url weights:
state = model_zoo.load_url(resnet50_url)
        for k, v in state.items():
            if 'fc' in k:
                continue
            self.state_dict().update({k: v})

But it turns out that the weights are not updated at all. So what is my fault doing this ? And is my best choice actually is simply assign a pretrained=True to my borrowing resnet50 ?