Closed 237014845 closed 4 years ago
It loads fine here and with other PyTorch code, so don't see why this is an issue here. The pretrained checkpoints here are like torchvision ones, just the state_dict at the top level. mmdetection may be expecting a checkpoint with another dict layer and state_dict under a specific key, dig into their code and figure out what's going on.
Traceback (most recent call last): File "train.py", line 138, in
main()
File "train.py", line 116, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/home/hs/hao/contextnet/mmdetection-master/mmdet/models/builder.py", line 43, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/hs/hao/contextnet/mmdetection-master/mmdet/models/builder.py", line 15, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/hs/hao/contextnet/mmdetection-master/mmdet/utils/registry.py", line 76, in build_from_cfg
return obj_cls(**args)
File "/home/hs/hao/contextnet/mmdetection-master/mmdet/models/detectors/retinanet.py", line 16, in init
test_cfg, pretrained)
File "/home/hs/hao/contextnet/mmdetection-master/mmdet/models/detectors/single_stage.py", line 31, in init
self.init_weights(pretrained=pretrained)
File "/home/hs/hao/contextnet/mmdetection-master/mmdet/models/detectors/single_stage.py", line 35, in init_weights
self.backbone.init_weights(pretrained=pretrained)
File "/home/hs/hao/contextnet/mmdetection-master/mmdet/models/backbones/mixnet.py", line 837, in init_weights
load_checkpoint(self, pretrained, strict=False, logger=logger)
File "/home/hs/anaconda3/lib/python3.7/site-packages/mmcv/runner/checkpoint.py", line 181, in load_checkpoint
'No state_dict found in checkpoint file {}'.format(filename))
RuntimeError: No state_dict found in checkpoint file /home/hs/hao/contextnet/mmdetection-master/weights/mixnet/mixnet_m-4647fc68.pth