You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: