您好!对有线表格推理时加载模型失败
Selvaggiar opened this issue · 0 comments
bash scripts/infer/demo_wired.sh 推理有线表格时,报了个关于加载模型权重的错误(但无线表格可以成功推理),请问该怎么解决呀?
Traceback (most recent call last):
File "demo.py", line 82, in
demo(opt)
File "demo.py", line 21, in demo
detector = Detector(opt)
File "/data/xyj/space/AdvancedLiterateMachinery/DocumentUnderstanding/LORE-TSR/src/lib/detectors/ctdet.py", line 32, in init
super(CtdetDetector, self).init(opt)
File "/data/xyj/space/AdvancedLiterateMachinery/DocumentUnderstanding/LORE-TSR/src/lib/detectors/base_detector.py", line 24, in init
self.model = create_model(opt.arch, opt.heads, opt.head_conv)
File "/data/xyj/space/AdvancedLiterateMachinery/DocumentUnderstanding/LORE-TSR/src/lib/models/model.py", line 31, in create_model
model = get_model(num_layers=num_layers, heads=heads, head_conv=head_conv)
File "/data/xyj/space/AdvancedLiterateMachinery/DocumentUnderstanding/LORE-TSR/src/lib/models/networks/pose_dla_dcn.py", line 493, in get_pose_net
head_conv=head_conv)
File "/data/xyj/space/AdvancedLiterateMachinery/DocumentUnderstanding/LORE-TSR/src/lib/models/networks/pose_dla_dcn.py", line 436, in init
self.base = globals()base_name
File "/data/xyj/space/AdvancedLiterateMachinery/DocumentUnderstanding/LORE-TSR/src/lib/models/networks/pose_dla_dcn.py", line 315, in dla34
model.load_pretrained_model(data='imagenet', name='dla34', hash='ba72cf86')
File "/data/xyj/space/AdvancedLiterateMachinery/DocumentUnderstanding/LORE-TSR/src/lib/models/networks/pose_dla_dcn.py", line 301, in load_pretrained_model
model_weights = model_zoo.load_url(model_url)
File "/data/xyj/anaconda3/envs/Lore/lib/python3.7/site-packages/torch/hub.py", line 595, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "/data/xyj/anaconda3/envs/Lore/lib/python3.7/site-packages/torch/serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/data/xyj/anaconda3/envs/Lore/lib/python3.7/site-packages/torch/serialization.py", line 920, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.