pytorch-cnn-finetune icon indicating copy to clipboard operation
pytorch-cnn-finetune copied to clipboard

how can i load the trained-model

Open LianShuaiLong opened this issue 3 years ago • 2 comments

hello, i finetune the pre-trained inception_v4 model with 3 classes,by model=make_model('inception_v4',3,pretrained=True) , and saved the trained-model as 'model.pth' by torch.save(model.state_dict(),'model.pth') but when i restored the model by model = make_model('inception_v4',3,pretrained=False) model.load_state_dict(torch.load('model.pth')) it goes wrong,and the error is : Unexpected key(s) in state_dict: "model._features.0.conv.weight", "model._features.0.bn.weight", "model._features.0.bn.bias", "model._features.0.bn.running_mean", "model._features.0.bn.running_var", "model._features.0.bn.num_batches_tracked", "model._features.1.conv.weight", "model._features.1.bn.weight", "model._features.1.bn.bias", "model._features.1.bn.running_mean", "model._features.1.bn.running_var", "model._features.1.bn.num_batches_tracked", "model._features.2.conv.weight", "model._features.2.bn.weight", "model._features.2.bn.bias", "model._features.2.bn.running_mean", "model._features.2.bn.running_var", "model._features.2.bn.num_batches_tracked", "model._features.3.conv.conv.weight", "model._features.3.conv.bn.weight", "model._features.3.conv.bn.bias", "model._features.3.conv.bn.running_mean", "model._features.3.conv.bn.running_var", "model._features.3.conv.bn.num_batches_tracked", "model._features.4.branch0.0.conv.weight", "model._features.4.branch0.0.bn.weight", "model._features.4.branch0.0.bn.bias", "model._features.4.branch0.0.bn.running_mean", "model._features.4.branch0.0.bn.running_var", "model._features.4.branch0.0.bn.num_batches_tracked", "model._features.4.branch0.1.conv.weight", "model._features.4.branch0.1.bn.weight", "model._features.4.branch0.1.bn.bias", "model._features.4.branch0.1.bn.running_mean", "model._features.4.branch0.1.bn.running_var", "model._features.4.branch0.1.bn.num_batches_tracked", "model._features.4.branch1.0.conv.weight", "model._features.4.branch1.0.bn.weight", "model._features.4.branch1.0.bn.bias", "model._features.4.branch1.0.bn.running_mean", "model._features.4.branch1.0.bn.running_var", "model._features.4.branch1.0.bn.num_batches_tracked", "model._features.4.branch1.1.conv.weight", "model._features.4.branch1.1.bn.weight", "model._features.4.branch1.1.bn.bias", "model._features.4.branch1.1.bn.running_mean", "model._features.4.branch1.1.bn.running_var", "model._features.4.branch1.1.bn.num_batches_tracked", "model._features.4.branch1.2.conv.weight", "model._features.4.branch1.2.bn.weight", "model._features.4.branch1.2.bn.bias", "model._features.4.branch1.2.bn.running_mean", "model._features.4.branch1.2.bn.running_var", "model._features.4.branch1.2.bn.num_batches_tracked", "model._features.4.branch1.3.conv.weight", "model._features.4.branch1.3.bn.weight", "model._features.4.branch1.3.bn.bias", "model._features.4.branch1.3.bn.running_mean", "model._features.4.branch1.3.bn.running_var", "model._features.4.branch1.3.bn.num_batches_tracked", "model._features.5.conv.conv.weight", "model._features.5.conv.bn.weight", "model._features.5.conv.bn.bias", "model._features.5.conv.bn.running_mean", "model._features.5.conv.bn.running_var", "model._features.5.conv.bn.num_batches_tracked", "model._features.6.branch0.conv.weight", "model._features.6.branch0.bn.weight", "model._features.6.branch0.bn.bias", "model._features.6.branch0.bn.running_mean", "model._features.6.branch0.bn.running_var", "model._features.6.branch0.bn.num_batches_tracked", "model._features.6.branch1.0.conv.weight", "model._features.6.branch1.0.bn.weight", "model._features.6.branch1.0.bn.bias", "model._features.6.branch1.0.bn.running_mean", "model._features.6.branch1.0.bn.running_var", "model._features.6.branch1.0.bn.num_batches_tracked", "model._features.6.branch1.1.conv.weight", "model._features.6.branch1.1.bn.weight", "model._features.6.branch1.1.bn.bias", "model._features.6.branch1.1.bn.running_mean", "model._features.6.branch1.1.bn.running_var", "model._features.6.branch1.1.bn.num_batches_tracked", "model._features.6.branch2.0.conv.weight", "model._features.6.branch2.0.bn.weight", "model._features.6.branch2.0.bn.bias", "model._features.6.branch2.0.bn.running_mean", "model._features.6.branch2.0.bn.running_var", "model._features.6.branch2.0.bn.num_batches_tracked", "model._features.6.branch2.1.conv.weight", "model._features.6.branch2.1.bn.weight", "model._features.6.branch2.1.bn.bias", "model._features.6.branch2.1.bn.running_mean", "model._features.6.branch2.1.bn.running_var", "model._features.6.branch2.1.bn.num_batches_tracked", "model._features.6.branch2.2.conv.weight", "model._features.6.branch2.2.bn.weight", "model._features.6.branch2.2.bn.bias", "model._features.6.branch2.2.bn.running_mean", "model._features.6.branch2.2.bn.running_var", "model._features.6.branch2.2.bn.num_batches_tracked", "model._features.6.branch3.1.conv.weight", "model._features.6.branch3.1.bn.weight", "model._features.6.branch3.1.bn.bias", "model._features.6.branch3.1.bn.running_mean", "model._features.6.branch3.1.bn.running_var", "model._features.6.branch3.1.bn.num_batches_tracked", "model._features.7.branch0.conv.weight", "model._features.7.branch0.bn.weight", "model._features.7.branch0.bn.bias", "model._features.7.branch0.bn.running_mean", "model._features.7.branch0.bn.running_var", "model._features.7.branch0.bn.num_batches_tracked", "model._features.7.branch1.0.conv.weight", "model._features.7.branch1.0.bn.weight", "model._features.7.branch1.0.bn.bias", "model._features.7.branch1.0.bn.running_mean", "model._features.7.branch1.0.bn.running_var", "model._features.7.branch1.0.bn.num_batches_tracked", "model._features.7.branch1.1.conv.weight", "model._features.7.branch1.1.bn.weight", "model._features.7.branch1.1.bn.bias", "model._features.7.branch1.1.bn.running_mean", "model._features.7.branch1.1.bn.running_var", "model._features.7.branch1.1.bn.num_batches_tracked", "model._features.7.branch2.0.conv.weight", "model._features.7.branch2.0.bn.weight", "model._features.7.branch2.0.bn.bias", "model._features.7.branch2.0.bn.running_mean", "model._features.7.branch2.0.bn.running_var", "model._features.7.branch2.0.bn.num_batches_tracked", "model._features.7.branch2.1.conv.weight", "model._features.7.branch2.1.bn.weight", "model._features.7.branch2.1.bn.bias", "model._features.7.branch2.1.bn.running_mean", "model._features.7.branch2.1.bn.running_var", "model._features.7.branch2.1.bn.num_batches_tracked", "model._features.7.branch2.2.conv.weight", "model._features.7.branch2.2.bn.weight", "model._features.7.branch2.2.bn.bias", "model._features.7.branch2.2.bn.running_mean", "model._features.7.branch2.2.bn.running_var", "model._features.7.branch2.2.bn.num_batches_tracked", "model._features.7.branch3.1.conv.weight", "model._features.7.branch3.1.bn.weight", "model._features.7.branch3.1.bn.bias", "model._features.7.branch3.1.bn.running_mean", "model._features.7.branch3.1.bn.running_var", "model._features.7.branch3.1.bn.num_batches_tracked", "model._features.8.branch0.conv.weight", "model._features.8.branch0.bn.weight", "model._features.8.branch0.bn.bias", "model._features.8.branch0.bn.running_mean", "model._features.8.branch0.bn.running_var", "model._features.8.branch0.bn.num_batches_tracked", "model._features.8.branch1.0.conv.weight", "model._features.8.branch1.0.bn.weight", "model._features.8.branch1.0.bn.bias", "model._features.8.branch1.0.bn.running_mean", "model._features.8.branch1.0.bn.running_var", "model._features.8.branch1.0.bn.num_batches_tracked", "model._features.8.branch1.1.conv.weight", "model._features.8.branch1.1.bn.weight", "model._features.8.branch1.1.bn.bias", "model._features.8.branch1.1.bn.running_mean", "model._features.8.branch1.1.bn.running_var", "model._features.8.branch1.1.bn.num_batches_tracked", "model._features.8.branch2.0.conv.weight", "model._features.8.branch2.0.bn.weight", "model._features.8.branch2.0.bn.bias", "model._features.8.branch2.0.bn.running_mean", "model._features.8.branch2.0.bn.running_var", "model._features.8.branch2.0.bn.num_batches_tracked", "model._features.8.branch2.1.conv.weight", "model._features.8.branch2.1.bn.weight", "model._features.8.branch2.1.bn.bias", "model._features.8.branch2.1.bn.running_mean", "model._features.8.branch2.1.bn.running_var", "model._features.8.branch2.1.bn.num_batches_tracked", "model._features.8.branch2.2.conv.weight", "model._features.8.branch2.2.bn.weight", "model._features.8.branch2.2.bn.bias", "model._features.8.branch2.2.bn.running_mean", "model._features.8.branch2.2.bn.running_var", "model._features.8.branch2.2.bn.num_batches_tracked", "model._features.8.branch3.1.conv.weight", "model._features.8.branch3.1.bn.weight", "model._features.8.branch3.1.bn.bias", "model._features.8.branch3.1.bn.running_mean", "model._features.8.branch3.1.bn.running_var", "model._features.8.branch3.1.bn.num_batches_tracked", "model._features.9.branch0.conv.weight", "model._features.9.branch0.bn.weight", "model._features.9.branch0.bn.bias", "model._features.9.branch0.bn.running_mean", "model._features.9.branch0.bn.running_var", "model._features.9.branch0.bn.num_batches_tracked", "model._features.9.branch1.0.conv.weight", "model._features.9.branch1.0.bn.weight", "model._features.9.branch1.0.bn.bias", "model._features.9.branch1.0.bn.running_mean", "model._features.9.branch1.0.bn.running_var", "model._features.9.branch1.0.bn.num_batches_tracked", "model._features.9.branch1.1.conv.weight", "model._features.9.branch1.1.bn.weight", "model._features.9.branch1.1.bn.bias", "model._features.9.branch1.1.bn.running_mean", "model._features.9.branch1.1.bn.running_var", "model._features.9.branch1.1.bn.num_batches_tracked", "model._features.9.branch2.0.conv.weight", "model._features.9.branch2.0.bn.weight", "model._features.9.branch2.0.bn.bias", "model._features.9.branch2.0.bn.running_mean", "model._features.9.branch2.0.bn.running_var", "model._features.9.branch2.0.bn.num_batches_tracked", "model._features.9.branch2.1.conv.weight", "model._features.9.branch2.1.bn.weight", "model._features.9.branch2.1.bn.bias", "model._features.9.branch2.1.bn.running_mean", "model._features.9.branch2.1.bn.running_var", "model._features.9.branch2.1.bn.num_batches_tracked", "model._features.9.branch2.2.conv.weight", "model._features.9.branch2.2.bn.weight", "model._features.9.branch2.2.bn.bias", "model._features.9.branch2.2.bn.running_mean", "model._features.9.branch2.2.bn.running_var", "model._features.9.branch2.2.bn.num_batches_tracked", "model._features.9.branch3.1.conv.weight", "model._features.9.branch3.1.bn.weight", "model._features.9.branch3.1.bn.bias", "model._features.9.branch3.1.bn.running_mean", "model._features.9.branch3.1.bn.running_var", "model._features.9.branch3.1.bn.num_batches_tracked", "model._features.10.branch0.conv.weight", "model._features.10.branch0.bn.weight", "model._features.10.branch0.bn.bias", "model._features.10.branch0.bn.running_mean", "model._features.10.branch0.bn.running_var", "model._features.10.branch0.bn.num_batches_tracked", "model._features.10.branch1.0.conv.weight", "model._features.10.branch1.0.bn.weight", "model._features.10.branch1.0.bn.bias", "model._features.10.branch1.0.bn.running_mean", "model._features.10.branch1.0.bn.running_var", "model._features.10.branch1.0.bn.num_batches_tracked", "model._features.10.branch1.1.conv.weight", "model._features.10.branch1.1.bn.weight", "model._features.10.branch1.1.bn.bias", "model._features.10.branch1.1.bn.running_mean", "model._features.10.branch1.1.bn.running_var", "model._features.10.branch1.1.bn.num_batches_tracked", "model._features.10.branch1.2.conv.weight", "model._features.10.branch1.2.bn.weight", "model._features.10.branch1.2.bn.bias", "model._features.10.branch1.2.bn.running_mean", "model._features.10.branch1.2.bn.running_var", "model._features.10.branch1.2.bn.num_batches_tracked", "model._features.11.branch0.conv.weight", "model._features.11.branch0.bn.weight", "model._features.11.branch0.bn.bias", "model._features.11.branch0.bn.running_mean", "model._features.11.branch0.bn.running_var", "model._features.11.branch0.bn.num_batches_tracked", "model._features.11.branch1.0.conv.weight", "model._features.11.branch1.0.bn.weight", "model._features.11.branch1.0.bn.bias", "model._features.11.branch1.0.bn.running_mean", "model._features.11.branch1.0.bn.running_var", "model._features.11.branch1.0.bn.num_batches_tracked", "model._features.11.branch1.1.conv.weight", "model._features.11.branch1.1.bn.weight", "model._features.11.branch1.1.bn.bias", "model._features.11.branch1.1.bn.running_mean", "model._features.11.branch1.1.bn.running_var", "model._features.11.branch1.1.bn.num_batches_tracked", "model._features.11.branch1.2.conv.weight", "model._features.11.branch1.2.bn.weight", "model._features.11.branch1.2.bn.bias", "model._features.11.branch1.2.bn.running_mean", "model._features.11.branch1.2.bn.running_var", "model._features.11.branch1.2.bn.num_batches_tracked", "model._features.11.branch2.0.conv.weight", "model._features.11.branch2.0.bn.weight", "model._features.11.branch2.0.bn.bias", "model._features.11.branch2.0.bn.running_mean", "model._features.11.branch2.0.bn.running_var", "model._features.11.branch2.0.bn.num_batches_tracked", "model._features.11.branch2.1.conv.weight", "model._features.11.branch2.1.bn.weight", "model._features.11.branch2.1.bn.bias", "model._features.11.branch2.1.bn.running_mean", "model._features.11.branch2.1.bn.running_var", "model._features.11.branch2.1.bn.num_batches_tracked", "model._features.11.branch2.2.conv.weight", "model._features.11.branch2.2.bn.weight", "model._features.11.branch2.2.bn.bias", "model._features.11.branch2.2.bn.running_mean", "model._features.11.branch2.2.bn.running_var", "model._features.11.branch2.2.bn.num_batches_tracked", "model._features.11.branch2.3.conv.weight", "model._features.11.branch2.3.bn.weight", "model._features.11.branch2.3.bn.bias", "model._features.11.branch2.3.bn.running_mean", "model._features.11.branch2.3.bn.running_var", "model._features.11.branch2.3.bn.num_batches_tracked", "model._features.11.branch2.4.conv.weight", "model._features.11.branch2.4.bn.weight", "model._features.11.branch2.4.bn.bias", "model._features.11.branch2.4.bn.running_mean", "model._features.11.branch2.4.bn.running_var", "model._features.11.branch2.4.bn.num_batches_tracked", "model._features.11.branch3.1.conv.weight", "model._features.11.branch3.1.bn.weight", "model._features.11.branch3.1.bn.bias", "model._features.11.branch3.1.bn.running_mean", "model._features.11.branch3.1.bn.running_var", "model._features.11.branch3.1.bn.num_batches_tracked", "model._features.12.branch0.conv.weight", "model._features.12.branch0.bn.weight", "model._features.12.branch0.bn.bias", "model._features.12.branch0.bn.running_mean", "model._features.12.branch0.bn.running_var", "model._features.12.branch0.bn.num_batches_tracked", "model._features.12.branch1.0.conv.weight", "model._features.12.branch1.0.bn.weight", "model._features.12.branch1.0.bn.bias", "model._features.12.branch1.0.bn.running_mean", "model._features.12.branch1.0.bn.running_var", "model._features.12.branch1.0.bn.num_batches_tracked", "model._features.12.branch1.1.conv.weight", "model._features.12.branch1.1.bn.weight", "model._features.12.branch1.1.bn.bias", "model._features.12.branch1.1.bn.running_mean", "model._features.12.branch1.1.bn.running_var", "model._features.12.branch1.1.bn.num_batches_tracked", "model._features.12.branch1.2.conv.weight", "model._features.12.branch1.2.bn.weight", "model._features.12.branch1.2.bn.bias", "model._features.12.branch1.2.bn.running_mean", "model._features.12.branch1.2.bn.running_var", "model._features.12.branch1.2.bn.num_batches_tracked", "model._features.12.branch2.0.conv.weight", "model._features.12.branch2.0.bn.weight", "model._features.12.branch2.0.bn.bias", "model._features.12.branch2.0.bn.running_mean", "model._features.12.branch2.0.bn.running_var", "model._features.12.branch2.0.bn.num_batches_tracked", "model._features.12.branch2.1.conv.weight", "model._features.12.branch2.1.bn.weight", "model._features.12.branch2.1.bn.bias", "model._features.12.branch2.1.bn.running_mean", "model._features.12.branch2.1.bn.running_var", "model._features.12.branch2.1.bn.num_batches_tracked", "model._features.12.branch2.2.conv.weight", "model._features.12.branch2.2.bn.weight", "model._features.12.branch2.2.bn.bias", "model._features.12.branch2.2.bn.running_mean", "model._features.12.branch2.2.bn.running_var", "model._features.12.branch2.2.bn.num_batches_tracked", "model._features.12.branch2.3.conv.weight", "model._features.12.branch2.3.bn.weight", "model._features.12.branch2.3.bn.bias", "model._features.12.branch2.3.bn.running_mean", "model._features.12.branch2.3.bn.running_var", "model._features.12.branch2.3.bn.num_batches_tracked", "model._features.12.branch2.4.conv.weight", "model._features.12.branch2.4.bn.weight", "model._features.12.branch2.4.bn.bias", "model._features.12.branch2.4.bn.running_mean", "model._features.12.branch2.4.bn.running_var", "model._features.12.branch2.4.bn.num_batches_tracked", "model._features.12.branch3.1.conv.weight", "model._features.12.branch3.1.bn.weight", "model._features.12.branch3.1.bn.bias", "model._features.12.branch3.1.bn.running_mean", "model._features.12.branch3.1.bn.running_var", "model._features.12.branch3.1.bn.num_batches_tracked", "model._features.13.branch0.conv.weight", "model._features.13.branch0.bn.weight", "model._features.13.branch0.bn.bias", "model._features.13.branch0.bn.running_mean", "model._features.13.branch0.bn.running_var", "model._features.13.branch0.bn.num_batches_tracked", "model._features.13.branch1.0.conv.weight", "model._features.13.branch1.0.bn.weight", "model._features.13.branch1.0.bn.bias", "model._features.13.branch1.0.bn.running_mean", "model._features.13.branch1.0.bn.running_var", "model._features.13.branch1.0.bn.num_batches_tracked", "model._features.13.branch1.1.conv.weight", "model._features.13.branch1.1.bn.weight", "model._features.13.branch1.1.bn.bias", "model._features.13.branch1.1.bn.running_mean", "model._features.13.branch1.1.bn.running_var", "model._features.13.branch1.1.bn.num_batches_tracked", "model._features.13.branch1.2.conv.weight", "model._features.13.branch1.2.bn.weight", "model._features.13.branch1.2.bn.bias", "model._features.13.branch1.2.bn.running_mean", "model._features.13.branch1.2.bn.running_var", "model._features.13.branch1.2.bn.num_batches_tracked", "model._features.13.branch2.0.conv.weight", "model._features.13.branch2.0.bn.weight", "model._features.13.branch2.0.bn.bias", "model._features.13.branch2.0.bn.running_mean", "model._features.13.branch2.0.bn.running_var", "model._features.13.branch2.0.bn.num_batches_tracked", "model._features.13.branch2.1.conv.weight", "model._features.13.branch2.1.bn.weight", "model._features.13.branch2.1.bn.bias", "model._features.13.branch2.1.bn.running_mean", "model._features.13.branch2.1.bn.running_var", "model._features.13.branch2.1.bn.num_batches_tracked", "model._features.13.branch2.2.conv.weight", "model._features.13.branch2.2.bn.weight", "model._features.13.branch2.2.bn.bias", "model._features.13.branch2.2.bn.running_mean", "model._features.13.branch2.2.bn.running_var", "model._features.13.branch2.2.bn.num_batches_tracked", "model._features.13.branch2.3.conv.weight", "model._features.13.branch2.3.bn.weight", "model._features.13.branch2.3.bn.bias", "model._features.13.branch2.3.bn.running_mean", "model._features.13.branch2.3.bn.running_var", "model._features.13.branch2.3.bn.num_batches_tracked", "model._features.13.branch2.4.conv.weight", "model._features.13.branch2.4.bn.weight", "model._features.13.branch2.4.bn.bias", "model._features.13.branch2.4.bn.running_mean", "model._features.13.branch2.4.bn.running_var", "model._features.13.branch2.4.bn.num_batches_tracked", "model._features.13.branch3.1.conv.weight", "model._features.13.branch3.1.bn.weight", "model._features.13.branch3.1.bn.bias", "model._features.13.branch3.1.bn.running_mean", "model._features.13.branch3.1.bn.running_var", "model._features.13.branch3.1.bn.num_batches_tracked", "model._features.14.branch0.conv.weight", "model._features.14.branch0.bn.weight", "model._features.14.branch0.bn.bias", "model._features.14.branch0.bn.running_mean", "model._features.14.branch0.bn.running_var", "model._features.14.branch0.bn.num_batches_tracked", "model._features.14.branch1.0.conv.weight", "model._features.14.branch1.0.bn.weight", "model._features.14.branch1.0.bn.bias", "model._features.14.branch1.0.bn.running_mean", "model._features.14.branch1.0.bn.running_var", "model._features.14.branch1.0.bn.num_batches_tracked", "model._features.14.branch1.1.conv.weight", "model._features.14.branch1.1.bn.weight", "model._features.14.branch1.1.bn.bias", "model._features.14.branch1.1.bn.running_mean", "model._features.14.branch1.1.bn.running_var", "model._features.14.branch1.1.bn.num_batches_tracked", "model._features.14.branch1.2.conv.weight", "model._features.14.branch1.2.bn.weight", "model._features.14.branch1.2.bn.bias", "model._features.14.branch1.2.bn.running_mean", "model._features.14.branch1.2.bn.running_var", "model._features.14.branch1.2.bn.num_batches_tracked", "model._features.14.branch2.0.conv.weight", "model._features.14.branch2.0.bn.weight", "model._features.14.branch2.0.bn.bias", "model._features.14.branch2.0.bn.running_mean", "model._features.14.branch2.0.bn.running_var", "model._features.14.branch2.0.bn.num_batches_tracked", "model._features.14.branch2.1.conv.weight", "model._features.14.branch2.1.bn.weight", "model._features.14.branch2.1.bn.bias", "model._features.14.branch2.1.bn.running_mean", "model._features.14.branch2.1.bn.running_var", "model._features.14.branch2.1.bn.num_batches_tracked", "model._features.14.branch2.2.conv.weight", "model._features.14.branch2.2.bn.weight", "model._features.14.branch2.2.bn.bias", "model._features.14.branch2.2.bn.running_mean", "model._features.14.branch2.2.bn.running_var", "model._features.14.branch2.2.bn.num_batches_tracked", "model._features.14.branch2.3.conv.weight", "model._features.14.branch2.3.bn.weight", "model._features.14.branch2.3.bn.bias", "model._features.14.branch2.3.bn.running_mean", "model._features.14.branch2.3.bn.running_var", "model._features.14.branch2.3.bn.num_batches_tracked", "model._features.14.branch2.4.conv.weight", "model._features.14.branch2.4.bn.weight", "model._features.14.branch2.4.bn.bias", "model._features.14.branch2.4.bn.running_mean", "model._features.14.branch2.4.bn.running_var", "model._features.14.branch2.4.bn.num_batches_tracked", "model._features.14.branch3.1.conv.weight", "model._features.14.branch3.1.bn.weight", "model._features.14.branch3.1.bn.bias", "model._features.14.branch3.1.bn.running_mean", "model._features.14.branch3.1.bn.running_var", "model._features.14.branch3.1.bn.num_batches_tracked", "model._features.15.branch0.conv.weight", "model._features.15.branch0.bn.weight", "model._features.15.branch0.bn.bias", "model._features.15.branch0.bn.running_mean", "model._features.15.branch0.bn.running_var", "model._features.15.branch0.bn.num_batches_tracked", "model._features.15.branch1.0.conv.weight", "model._features.15.branch1.0.bn.weight", "model._features.15.branch1.0.bn.bias", "model._features.15.branch1.0.bn.running_mean", "model._features.15.branch1.0.bn.running_var", "model._features.15.branch1.0.bn.num_batches_tracked", "model._features.15.branch1.1.conv.weight", "model._features.15.branch1.1.bn.weight", "model._features.15.branch1.1.bn.bias", "model._features.15.branch1.1.bn.running_mean", "model._features.15.branch1.1.bn.running_var", "model._features.15.branch1.1.bn.num_batches_tracked", "model._features.15.branch1.2.conv.weight", "model._features.15.branch1.2.bn.weight", "model._features.15.branch1.2.bn.bias", "model._features.15.branch1.2.bn.running_mean", "model._features.15.branch1.2.bn.running_var", "model._features.15.branch1.2.bn.num_batches_tracked", "model._features.15.branch2.0.conv.weight", "model._features.15.branch2.0.bn.weight", "model._features.15.branch2.0.bn.bias", "model._features.15.branch2.0.bn.running_mean", "model._features.15.branch2.0.bn.running_var", "model._features.15.branch2.0.bn.num_batches_tracked", "model._features.15.branch2.1.conv.weight", "model._features.15.branch2.1.bn.weight", "model._features.15.branch2.1.bn.bias", "model._features.15.branch2.1.bn.running_mean", "model._features.15.branch2.1.bn.running_var", "model._features.15.branch2.1.bn.num_batches_tracked", "model._features.15.branch2.2.conv.weight", "model._features.15.branch2.2.bn.weight", "model._features.15.branch2.2.bn.bias", "model._features.15.branch2.2.bn.running_mean", "model._features.15.branch2.2.bn.running_var", "model._features.15.branch2.2.bn.num_batches_tracked", "model._features.15.branch2.3.conv.weight", "model._features.15.branch2.3.bn.weight", "model._features.15.branch2.3.bn.bias", "model._features.15.branch2.3.bn.running_mean", "model._features.15.branch2.3.bn.running_var", "model._features.15.branch2.3.bn.num_batches_tracked", "model._features.15.branch2.4.conv.weight", "model._features.15.branch2.4.bn.weight", "model._features.15.branch2.4.bn.bias", "model._features.15.branch2.4.bn.running_mean", "model._features.15.branch2.4.bn.running_var", "model._features.15.branch2.4.bn.num_batches_tracked", "model._features.15.branch3.1.conv.weight", "model._features.15.branch3.1.bn.weight", "model._features.15.branch3.1.bn.bias", "model._features.15.branch3.1.bn.running_mean", "model._features.15.branch3.1.bn.running_var", "model._features.15.branch3.1.bn.num_batches_tracked", "model._features.16.branch0.conv.weight", "model._features.16.branch0.bn.weight", "model._features.16.branch0.bn.bias", "model._features.16.branch0.bn.running_mean", "model._features.16.branch0.bn.running_var", "model._features.16.branch0.bn.num_batches_tracked", "model._features.16.branch1.0.conv.weight", "model._features.16.branch1.0.bn.weight", "model._features.16.branch1.0.bn.bias", "model._features.16.branch1.0.bn.running_mean", "model._features.16.branch1.0.bn.running_var", "model._features.16.branch1.0.bn.num_batches_tracked", "model._features.16.branch1.1.conv.weight", "model._features.16.branch1.1.bn.weight", "model._features.16.branch1.1.bn.bias", "model._features.16.branch1.1.bn.running_mean", "model._features.16.branch1.1.bn.running_var", "model._features.16.branch1.1.bn.num_batches_tracked", "model._features.16.branch1.2.conv.weight", "model._features.16.branch1.2.bn.weight", "model._features.16.branch1.2.bn.bias", "model._features.16.branch1.2.bn.running_mean", "model._features.16.branch1.2.bn.running_var", "model._features.16.branch1.2.bn.num_batches_tracked", "model._features.16.branch2.0.conv.weight", "model._features.16.branch2.0.bn.weight", "model._features.16.branch2.0.bn.bias", "model._features.16.branch2.0.bn.running_mean", "model._features.16.branch2.0.bn.running_var", "model._features.16.branch2.0.bn.num_batches_tracked", "model._features.16.branch2.1.conv.weight", "model._features.16.branch2.1.bn.weight", "model._features.16.branch2.1.bn.bias", "model._features.16.branch2.1.bn.running_mean", "model._features.16.branch2.1.bn.running_var", "model._features.16.branch2.1.bn.num_batches_tracked", "model._features.16.branch2.2.conv.weight", "model._features.16.branch2.2.bn.weight", "model._features.16.branch2.2.bn.bias", "model._features.16.branch2.2.bn.running_mean", "model._features.16.branch2.2.bn.running_var", "model._features.16.branch2.2.bn.num_batches_tracked", "model._features.16.branch2.3.conv.weight", "model._features.16.branch2.3.bn.weight", "model._features.16.branch2.3.bn.bias", "model._features.16.branch2.3.bn.running_mean", "model._features.16.branch2.3.bn.running_var", "model._features.16.branch2.3.bn.num_batches_tracked", "model._features.16.branch2.4.conv.weight", "model._features.16.branch2.4.bn.weight", "model._features.16.branch2.4.bn.bias", "model._features.16.branch2.4.bn.running_mean", "model._features.16.branch2.4.bn.running_var", "model._features.16.branch2.4.bn.num_batches_tracked", "model._features.16.branch3.1.conv.weight", "model._features.16.branch3.1.bn.weight", "model._features.16.branch3.1.bn.bias", "model._features.16.branch3.1.bn.running_mean", "model._features.16.branch3.1.bn.running_var", "model._features.16.branch3.1.bn.num_batches_tracked", "model._features.17.branch0.conv.weight", "model._features.17.branch0.bn.weight", "model._features.17.branch0.bn.bias", "model._features.17.branch0.bn.running_mean", "model._features.17.branch0.bn.running_var", "model._features.17.branch0.bn.num_batches_tracked", "model._features.17.branch1.0.conv.weight", "model._features.17.branch1.0.bn.weight", "model._features.17.branch1.0.bn.bias", "model._features.17.branch1.0.bn.running_mean", "model._features.17.branch1.0.bn.running_var", "model._features.17.branch1.0.bn.num_batches_tracked", "model._features.17.branch1.1.conv.weight", "model._features.17.branch1.1.bn.weight", "model._features.17.branch1.1.bn.bias", "model._features.17.branch1.1.bn.running_mean", "model._features.17.branch1.1.bn.running_var", "model._features.17.branch1.1.bn.num_batches_tracked", "model._features.17.branch1.2.conv.weight", "model._features.17.branch1.2.bn.weight", "model._features.17.branch1.2.bn.bias", "model._features.17.branch1.2.bn.running_mean", "model._features.17.branch1.2.bn.running_var", "model._features.17.branch1.2.bn.num_batches_tracked", "model._features.17.branch2.0.conv.weight", "model._features.17.branch2.0.bn.weight", "model._features.17.branch2.0.bn.bias", "model._features.17.branch2.0.bn.running_mean", "model._features.17.branch2.0.bn.running_var", "model._features.17.branch2.0.bn.num_batches_tracked", "model._features.17.branch2.1.conv.weight", "model._features.17.branch2.1.bn.weight", "model._features.17.branch2.1.bn.bias", "model._features.17.branch2.1.bn.running_mean", "model._features.17.branch2.1.bn.running_var", "model._features.17.branch2.1.bn.num_batches_tracked", "model._features.17.branch2.2.conv.weight", "model._features.17.branch2.2.bn.weight", "model._features.17.branch2.2.bn.bias", "model._features.17.branch2.2.bn.running_mean", "model._features.17.branch2.2.bn.running_var", "model._features.17.branch2.2.bn.num_batches_tracked", "model._features.17.branch2.3.conv.weight", "model._features.17.branch2.3.bn.weight", "model._features.17.branch2.3.bn.bias", "model._features.17.branch2.3.bn.running_mean", "model._features.17.branch2.3.bn.running_var", "model._features.17.branch2.3.bn.num_batches_tracked", "model._features.17.branch2.4.conv.weight", "model._features.17.branch2.4.bn.weight", "model._features.17.branch2.4.bn.bias", "model._features.17.branch2.4.bn.running_mean", "model._features.17.branch2.4.bn.running_var", "model._features.17.branch2.4.bn.num_batches_tracked", "model._features.17.branch3.1.conv.weight", "model._features.17.branch3.1.bn.weight", "model._features.17.branch3.1.bn.bias", "model._features.17.branch3.1.bn.running_mean", "model._features.17.branch3.1.bn.running_var", "model._features.17.branch3.1.bn.num_batches_tracked", "model._features.18.branch0.0.conv.weight", "model._features.18.branch0.0.bn.weight", "model._features.18.branch0.0.bn.bias", "model._features.18.branch0.0.bn.running_mean", "model._features.18.branch0.0.bn.running_var", "model._features.18.branch0.0.bn.num_batches_tracked", "model._features.18.branch0.1.conv.weight", "model._features.18.branch0.1.bn.weight", "model._features.18.branch0.1.bn.bias", "model._features.18.branch0.1.bn.running_mean", "model._features.18.branch0.1.bn.running_var", "model._features.18.branch0.1.bn.num_batches_tracked", "model._features.18.branch1.0.conv.weight", "model._features.18.branch1.0.bn.weight", "model._features.18.branch1.0.bn.bias", "model._features.18.branch1.0.bn.running_mean", "model._features.18.branch1.0.bn.running_var", "model._features.18.branch1.0.bn.num_batches_tracked", "model._features.18.branch1.1.conv.weight", "model._features.18.branch1.1.bn.weight", "model._features.18.branch1.1.bn.bias", "model._features.18.branch1.1.bn.running_mean", "model._features.18.branch1.1.bn.running_var", "model._features.18.branch1.1.bn.num_batches_tracked", "model._features.18.branch1.2.conv.weight", "model._features.18.branch1.2.bn.weight", "model._features.18.branch1.2.bn.bias", "model._features.18.branch1.2.bn.running_mean", "model._features.18.branch1.2.bn.running_var", "model._features.18.branch1.2.bn.num_batches_tracked", "model._features.18.branch1.3.conv.weight", "model._features.18.branch1.3.bn.weight", "model._features.18.branch1.3.bn.bias", "model._features.18.branch1.3.bn.running_mean", "model._features.18.branch1.3.bn.running_var", "model._features.18.branch1.3.bn.num_batches_tracked", "model._features.19.branch0.conv.weight", "model._features.19.branch0.bn.weight", "model._features.19.branch0.bn.bias", "model._features.19.branch0.bn.running_mean", "model._features.19.branch0.bn.running_var", "model._features.19.branch0.bn.num_batches_tracked", "model._features.19.branch1_0.conv.weight", "model._features.19.branch1_0.bn.weight", "model._features.19.branch1_0.bn.bias", "model._features.19.branch1_0.bn.running_mean", "model._features.19.branch1_0.bn.running_var", "model._features.19.branch1_0.bn.num_batches_tracked", "model._features.19.branch1_1a.conv.weight", "model._features.19.branch1_1a.bn.weight", "model._features.19.branch1_1a.bn.bias", "model._features.19.branch1_1a.bn.running_mean", "model._features.19.branch1_1a.bn.running_var", "model._features.19.branch1_1a.bn.num_batches_tracked", "model._features.19.branch1_1b.conv.weight", "model._features.19.branch1_1b.bn.weight", "model._features.19.branch1_1b.bn.bias", "model._features.19.branch1_1b.bn.running_mean", "model._features.19.branch1_1b.bn.running_var", "model._features.19.branch1_1b.bn.num_batches_tracked", "model._features.19.branch2_0.conv.weight", "model._features.19.branch2_0.bn.weight", "model._features.19.branch2_0.bn.bias", "model._features.19.branch2_0.bn.running_mean", "model._features.19.branch2_0.bn.running_var", "model._features.19.branch2_0.bn.num_batches_tracked", "model._features.19.branch2_1.conv.weight", "model._features.19.branch2_1.bn.weight", "model._features.19.branch2_1.bn.bias", "model._features.19.branch2_1.bn.running_mean", "model._features.19.branch2_1.bn.running_var", "model._features.19.branch2_1.bn.num_batches_tracked", "model._features.19.branch2_2.conv.weight", "model._features.19.branch2_2.bn.weight", "model._features.19.branch2_2.bn.bias", "model._features.19.branch2_2.bn.running_mean", "model._features.19.branch2_2.bn.running_var", "model._features.19.branch2_2.bn.num_batches_tracked", "model._features.19.branch2_3a.conv.weight", "model._features.19.branch2_3a.bn.weight", "model._features.19.branch2_3a.bn.bias", "model._features.19.branch2_3a.bn.running_mean", "model._features.19.branch2_3a.bn.running_var", "model._features.19.branch2_3a.bn.num_batches_tracked", "model._features.19.branch2_3b.conv.weight", "model._features.19.branch2_3b.bn.weight", "model._features.19.branch2_3b.bn.bias", "model._features.19.branch2_3b.bn.running_mean", "model._features.19.branch2_3b.bn.running_var", "model._features.19.branch2_3b.bn.num_batches_tracked", "model._features.19.branch3.1.conv.weight", "model._features.19.branch3.1.bn.weight", "model._features.19.branch3.1.bn.bias", "model._features.19.branch3.1.bn.running_mean", "model._features.19.branch3.1.bn.running_var", "model._features.19.branch3.1.bn.num_batches_tracked", "model._features.20.branch0.conv.weight", "model._features.20.branch0.bn.weight", "model._features.20.branch0.bn.bias", "model._features.20.branch0.bn.running_mean", "model._features.20.branch0.bn.running_var", "model._features.20.branch0.bn.num_batches_tracked", "model._features.20.branch1_0.conv.weight", "model._features.20.branch1_0.bn.weight", "model._features.20.branch1_0.bn.bias", "model._features.20.branch1_0.bn.running_mean", "model._features.20.branch1_0.bn.running_var", "model._features.20.branch1_0.bn.num_batches_tracked", "model._features.20.branch1_1a.conv.weight", "model._features.20.branch1_1a.bn.weight", "model._features.20.branch1_1a.bn.bias", "model._features.20.branch1_1a.bn.running_mean", "model._features.20.branch1_1a.bn.running_var", "model._features.20.branch1_1a.bn.num_batches_tracked", "model._features.20.branch1_1b.conv.weight", "model._features.20.branch1_1b.bn.weight", "model._features.20.branch1_1b.bn.bias", "model._features.20.branch1_1b.bn.running_mean", "model._features.20.branch1_1b.bn.running_var", "model._features.20.branch1_1b.bn.num_batches_tracked", "model._features.20.branch2_0.conv.weight", "model._features.20.branch2_0.bn.weight", "model._features.20.branch2_0.bn.bias", "model._features.20.branch2_0.bn.running_mean", "model._features.20.branch2_0.bn.running_var", "model._features.20.branch2_0.bn.num_batches_tracked", "model._features.20.branch2_1.conv.weight", "model._features.20.branch2_1.bn.weight", "model._features.20.branch2_1.bn.bias", "model._features.20.branch2_1.bn.running_mean", "model._features.20.branch2_1.bn.running_var", "model._features.20.branch2_1.bn.num_batches_tracked", "model._features.20.branch2_2.conv.weight", "model._features.20.branch2_2.bn.weight", "model._features.20.branch2_2.bn.bias", "model._features.20.branch2_2.bn.running_mean", "model._features.20.branch2_2.bn.running_var", "model._features.20.branch2_2.bn.num_batches_tracked", "model._features.20.branch2_3a.conv.weight", "model._features.20.branch2_3a.bn.weight", "model._features.20.branch2_3a.bn.bias", "model._features.20.branch2_3a.bn.running_mean", "model._features.20.branch2_3a.bn.running_var", "model._features.20.branch2_3a.bn.num_batches_tracked", "model._features.20.branch2_3b.conv.weight", "model._features.20.branch2_3b.bn.weight", "model._features.20.branch2_3b.bn.bias", "model._features.20.branch2_3b.bn.running_mean", "model._features.20.branch2_3b.bn.running_var", "model._features.20.branch2_3b.bn.num_batches_tracked", "model._features.20.branch3.1.conv.weight", "model._features.20.branch3.1.bn.weight", "model._features.20.branch3.1.bn.bias", "model._features.20.branch3.1.bn.running_mean", "model._features.20.branch3.1.bn.running_var", "model._features.20.branch3.1.bn.num_batches_tracked", "model._features.21.branch0.conv.weight", "model._features.21.branch0.bn.weight", "model._features.21.branch0.bn.bias", "model._features.21.branch0.bn.running_mean", "model._features.21.branch0.bn.running_var", "model._features.21.branch0.bn.num_batches_tracked", "model._features.21.branch1_0.conv.weight", "model._features.21.branch1_0.bn.weight", "model._features.21.branch1_0.bn.bias", "model._features.21.branch1_0.bn.running_mean", "model._features.21.branch1_0.bn.running_var", "model._features.21.branch1_0.bn.num_batches_tracked", "model._features.21.branch1_1a.conv.weight", "model._features.21.branch1_1a.bn.weight", "model._features.21.branch1_1a.bn.bias", "model._features.21.branch1_1a.bn.running_mean", "model._features.21.branch1_1a.bn.running_var", "model._features.21.branch1_1a.bn.num_batches_tracked", "model._features.21.branch1_1b.conv.weight", "model._features.21.branch1_1b.bn.weight", "model._features.21.branch1_1b.bn.bias", "model._features.21.branch1_1b.bn.running_mean", "model._features.21.branch1_1b.bn.running_var", "model._features.21.branch1_1b.bn.num_batches_tracked", "model._features.21.branch2_0.conv.weight", "model._features.21.branch2_0.bn.weight", "model._features.21.branch2_0.bn.bias", "model._features.21.branch2_0.bn.running_mean", "model._features.21.branch2_0.bn.running_var", "model._features.21.branch2_0.bn.num_batches_tracked", "model._features.21.branch2_1.conv.weight", "model._features.21.branch2_1.bn.weight", "model._features.21.branch2_1.bn.bias", "model._features.21.branch2_1.bn.running_mean", "model._features.21.branch2_1.bn.running_var", "model._features.21.branch2_1.bn.num_batches_tracked", "model._features.21.branch2_2.conv.weight", "model._features.21.branch2_2.bn.weight", "model._features.21.branch2_2.bn.bias", "model._features.21.branch2_2.bn.running_mean", "model._features.21.branch2_2.bn.running_var", "model._features.21.branch2_2.bn.num_batches_tracked", "model._features.21.branch2_3a.conv.weight", "model._features.21.branch2_3a.bn.weight", "model._features.21.branch2_3a.bn.bias", "model._features.21.branch2_3a.bn.running_mean", "model._features.21.branch2_3a.bn.running_var", "model._features.21.branch2_3a.bn.num_batches_tracked", "model._features.21.branch2_3b.conv.weight", "model._features.21.branch2_3b.bn.weight", "model._features.21.branch2_3b.bn.bias", "model._features.21.branch2_3b.bn.running_mean", "model._features.21.branch2_3b.bn.running_var", "model._features.21.branch2_3b.bn.num_batches_tracked", "model._features.21.branch3.1.conv.weight", "model._features.21.branch3.1.bn.weight", "model._features.21.branch3.1.bn.bias", "model._features.21.branch3.1.bn.running_mean", "model._features.21.branch3.1.bn.running_var", "model._features.21.branch3.1.bn.num_batches_tracked", "model._classifier.weight", "model._classifier.bias". how can i solve it? i am waiting for your reply

LianShuaiLong avatar Nov 03 '20 06:11 LianShuaiLong

when i change the state_dict by: from collections import OrderedDict state_dict = torch.load('model.pth') new_state_dict = OrderedDict() for k,v in state_dict.items(): new_key = k.strip('model.') new_state_dict[new_key] = v model.load_state_dict(new_state_dict)

the following errors occur: "_features.0.bn.num_batches_track", "_features.1.bn.num_batches_track", "_features.2.bn.num_batches_track", "_features.3.conv.bn.num_batches_track", "_features.4.branch0.0.bn.num_batches_track", "_features.4.branch0.1.bn.num_batches_track", "_features.4.branch1.0.bn.num_batches_track", "_features.4.branch1.1.bn.num_batches_track", "_features.4.branch1.2.bn.num_batches_track", "_features.4.branch1.3.bn.num_batches_track", "_features.5.conv.bn.num_batches_track", "_features.6.branch0.bn.num_batches_track", "_features.6.branch1.0.bn.num_batches_track", "_features.6.branch1.1.bn.num_batches_track", "_features.6.branch2.0.bn.num_batches_track", "_features.6.branch2.1.bn.num_batches_track", "_features.6.branch2.2.bn.num_batches_track", "_features.6.branch3.1.bn.num_batches_track", "_features.7.branch0.bn.num_batches_track", "_features.7.branch1.0.bn.num_batches_track", "_features.7.branch1.1.bn.num_batches_track", "_features.7.branch2.0.bn.num_batches_track", "_features.7.branch2.1.bn.num_batches_track", "_features.7.branch2.2.bn.num_batches_track", "_features.7.branch3.1.bn.num_batches_track", "_features.8.branch0.bn.num_batches_track", "_features.8.branch1.0.bn.num_batches_track", "_features.8.branch1.1.bn.num_batches_track", "_features.8.branch2.0.bn.num_batches_track", "_features.8.branch2.1.bn.num_batches_track", "_features.8.branch2.2.bn.num_batches_track", "_features.8.branch3.1.bn.num_batches_track", "_features.9.branch0.bn.num_batches_track", "_features.9.branch1.0.bn.num_batches_track", "_features.9.branch1.1.bn.num_batches_track", "_features.9.branch2.0.bn.num_batches_track", "_features.9.branch2.1.bn.num_batches_track", "_features.9.branch2.2.bn.num_batches_track", "_features.9.branch3.1.bn.num_batches_track", "_features.10.branch0.bn.num_batches_track", "_features.10.branch1.0.bn.num_batches_track", "_features.10.branch1.1.bn.num_batches_track", "_features.10.branch1.2.bn.num_batches_track", "_features.11.branch0.bn.num_batches_track", "_features.11.branch1.0.bn.num_batches_track", "_features.11.branch1.1.bn.num_batches_track", "_features.11.branch1.2.bn.num_batches_track", "_features.11.branch2.0.bn.num_batches_track", "_features.11.branch2.1.bn.num_batches_track", "_features.11.branch2.2.bn.num_batches_track", "_features.11.branch2.3.bn.num_batches_track", "_features.11.branch2.4.bn.num_batches_track", "_features.11.branch3.1.bn.num_batches_track", "_features.12.branch0.bn.num_batches_track", "_features.12.branch1.0.bn.num_batches_track", "_features.12.branch1.1.bn.num_batches_track", "_features.12.branch1.2.bn.num_batches_track", "_features.12.branch2.0.bn.num_batches_track", "_features.12.branch2.1.bn.num_batches_track", "_features.12.branch2.2.bn.num_batches_track", "_features.12.branch2.3.bn.num_batches_track", "_features.12.branch2.4.bn.num_batches_track", "_features.12.branch3.1.bn.num_batches_track", "_features.13.branch0.bn.num_batches_track", "_features.13.branch1.0.bn.num_batches_track", "_features.13.branch1.1.bn.num_batches_track", "_features.13.branch1.2.bn.num_batches_track", "_features.13.branch2.0.bn.num_batches_track", "_features.13.branch2.1.bn.num_batches_track", "_features.13.branch2.2.bn.num_batches_track", "_features.13.branch2.3.bn.num_batches_track", "_features.13.branch2.4.bn.num_batches_track", "_features.13.branch3.1.bn.num_batches_track", "_features.14.branch0.bn.num_batches_track", "_features.14.branch1.0.bn.num_batches_track", "_features.14.branch1.1.bn.num_batches_track", "_features.14.branch1.2.bn.num_batches_track", "_features.14.branch2.0.bn.num_batches_track", "_features.14.branch2.1.bn.num_batches_track", "_features.14.branch2.2.bn.num_batches_track", "_features.14.branch2.3.bn.num_batches_track", "_features.14.branch2.4.bn.num_batches_track", "_features.14.branch3.1.bn.num_batches_track", "_features.15.branch0.bn.num_batches_track", "_features.15.branch1.0.bn.num_batches_track", "_features.15.branch1.1.bn.num_batches_track", "_features.15.branch1.2.bn.num_batches_track", "_features.15.branch2.0.bn.num_batches_track", "_features.15.branch2.1.bn.num_batches_track", "_features.15.branch2.2.bn.num_batches_track", "_features.15.branch2.3.bn.num_batches_track", "_features.15.branch2.4.bn.num_batches_track", "_features.15.branch3.1.bn.num_batches_track", "_features.16.branch0.bn.num_batches_track", "_features.16.branch1.0.bn.num_batches_track", "_features.16.branch1.1.bn.num_batches_track", "_features.16.branch1.2.bn.num_batches_track", "_features.16.branch2.0.bn.num_batches_track", "_features.16.branch2.1.bn.num_batches_track", "_features.16.branch2.2.bn.num_batches_track", "_features.16.branch2.3.bn.num_batches_track", "_features.16.branch2.4.bn.num_batches_track", "_features.16.branch3.1.bn.num_batches_track", "_features.17.branch0.bn.num_batches_track", "_features.17.branch1.0.bn.num_batches_track", "_features.17.branch1.1.bn.num_batches_track", "_features.17.branch1.2.bn.num_batches_track", "_features.17.branch2.0.bn.num_batches_track", "_features.17.branch2.1.bn.num_batches_track", "_features.17.branch2.2.bn.num_batches_track", "_features.17.branch2.3.bn.num_batches_track", "_features.17.branch2.4.bn.num_batches_track", "_features.17.branch3.1.bn.num_batches_track", "_features.18.branch0.0.bn.num_batches_track", "_features.18.branch0.1.bn.num_batches_track", "_features.18.branch1.0.bn.num_batches_track", "_features.18.branch1.1.bn.num_batches_track", "_features.18.branch1.2.bn.num_batches_track", "_features.18.branch1.3.bn.num_batches_track", "_features.19.branch0.bn.num_batches_track", "_features.19.branch1_0.bn.num_batches_track", "_features.19.branch1_1a.bn.num_batches_track", "_features.19.branch1_1b.bn.num_batches_track", "_features.19.branch2_0.bn.num_batches_track", "_features.19.branch2_1.bn.num_batches_track", "_features.19.branch2_2.bn.num_batches_track", "_features.19.branch2_3a.bn.num_batches_track", "_features.19.branch2_3b.bn.num_batches_track", "_features.19.branch3.1.bn.num_batches_track", "_features.20.branch0.bn.num_batches_track", "_features.20.branch1_0.bn.num_batches_track", "_features.20.branch1_1a.bn.num_batches_track", "_features.20.branch1_1b.bn.num_batches_track", "_features.20.branch2_0.bn.num_batches_track", "_features.20.branch2_1.bn.num_batches_track", "_features.20.branch2_2.bn.num_batches_track", "_features.20.branch2_3a.bn.num_batches_track", "_features.20.branch2_3b.bn.num_batches_track", "_features.20.branch3.1.bn.num_batches_track", "_features.21.branch0.bn.num_batches_track", "_features.21.branch1_0.bn.num_batches_track", "_features.21.branch1_1a.bn.num_batches_track", "_features.21.branch1_1b.bn.num_batches_track", "_features.21.branch2_0.bn.num_batches_track", "_features.21.branch2_1.bn.num_batches_track", "_features.21.branch2_2.bn.num_batches_track", "_features.21.branch2_3a.bn.num_batches_track", "_features.21.branch2_3b.bn.num_batches_track", "_features.21.branch3.1.bn.num_batches_track".

LianShuaiLong avatar Nov 03 '20 07:11 LianShuaiLong

Hey @LianShuaiLong

Sorry, I can't reproduce the issue. I have created a Colab Notebook, and save/load logic works without errors in it - https://colab.research.google.com/drive/1s8fNAh7dgnBT9eB-ZrY_5DJoyQqYkXIR?usp=sharing

Maybe there are additional steps in your code that modifies the model? For example code like model = torch.nn.DataParallel(model) can change names of the keys in the state dict.

creafz avatar Nov 05 '20 15:11 creafz