ResNeSt icon indicating copy to clipboard operation
ResNeSt copied to clipboard

TypeError: load_state_dict_from_url() got an unexpected keyword argument 'check_hash'

Open YingLv1106 opened this issue 3 years ago • 2 comments

File "/home/lvying/Pycharm_Object/segment/Segmentation_rgbd/toolbox/models/backbone/resnest.py", line 3, in model = torch.hub.load('zhanghang1989/ResNeSt', 'resnest50', pretrained=True) File "/home/lvying/anaconda3/lib/python3.6/site-packages/torch/hub.py", line 340, in load model = entry(*args, **kwargs) File "/home/lvying/.cache/torch/hub/zhanghang1989_ResNeSt_master/resnest/torch/resnest.py", line 40, in resnest50 resnest_model_urls['resnest50'], progress=True, check_hash=True)) TypeError: load_state_dict_from_url() got an unexpected keyword argument 'check_hash'

YingLv1106 avatar Aug 10 '20 07:08 YingLv1106

I think your pytorch version is out-of-date. https://pytorch.org/docs/master/hub.html?highlight=load_state_dict_from_url#torch.hub.load_state_dict_from_url

You may update pytorch or remove that argument.

zhanghang1989 avatar Aug 10 '20 20:08 zhanghang1989

Hi: Thank you. When I remove the parameter 'check_hash=True', it's working.

------------------ 原始邮件 ------------------ 发件人: "zhanghang1989/ResNeSt" <[email protected]>; 发送时间: 2020年8月11日(星期二) 凌晨4:18 收件人: "zhanghang1989/ResNeSt"<[email protected]>; 抄送: "吕营"<[email protected]>;"Author"<[email protected]>; 主题: Re: [zhanghang1989/ResNeSt] TypeError: load_state_dict_from_url() got an unexpected keyword argument 'check_hash' (#105)

I think your pytorch version is out-of-date. https://pytorch.org/docs/master/hub.html?highlight=load_state_dict_from_url#torch.hub.load_state_dict_from_url

You may update pytorch or remove that argument.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

YingLv1106 avatar Aug 11 '20 00:08 YingLv1106