Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The pretrain cifar10 resnet110 indeed is resnet164 (BottleNeck) #36

Open
jiangyangzhou opened this issue Aug 24, 2019 · 1 comment
Open

Comments

@jiangyangzhou
Copy link

I found the pretrain cifar10 model resnet110 is not resnet110, but resnet164.
The model is:
model = resnet(depth = 164, block_name='bottleNeck')
Use this model can load the state_dict sucessfully, but I haven't check the accuracy.
btw, the state_dict contain 'module', we can load the state_dict like this:

def load_parallel_weight(model, weight):
    state_dict = torch.load(weight)['state_dict']
    new_dict={}
    for w in state_dict:
        new_dict['.'.join(filter(lambda x:x!="module", w.split('.')))] = state_dict[w]
    model.load_state_dict(new_dict)
@jiaqian
Copy link

jiaqian commented Oct 23, 2019

ahha, that's why the dictionary keys don't match. could you please upload the pre-trained model for resnet 110 with block_name='basicblock'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants