Zzh-tju / DIoU-pytorch-detectron

Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression (AAAI 2020)
GNU General Public License v3.0
87 stars 18 forks source link

Key Error in pretrained model #4

Open Fly-dream12 opened 4 years ago

Fly-dream12 commented 4 years ago

Thanks for your project! I have downloaded the pretrained model diou.pth , but when I use this it runs into an error like this:

File "DIoU-pytorch-detectron-master/lib/modeling/model_builder.py", line 128, in _init_modules resnet_utils.load_pretrained_imagenet_weights(self) File "DIoU-pytorch-detectron-master/lib/utils/resnet_weights_helper.py", line 38, in load_pretrained_imagenet_weights bn_mean = pretrianed_state_dict[pretrianed_name + '.running_mean'] KeyError: 'res1.bn1.running_mean'

I wonder if i have not set the right defualt settings

Zzh-tju commented 4 years ago

Have you try other weights?Or maybe environment problem.

Fly-dream12 commented 4 years ago

I have tried to set LOAD_IMAGENET_PRETRAINED_WEIGHTS to False and it can succesfully train. Is it OK?