Python ResNeSt问题:从\u url()加载\u state\u dict\u时遇到意外的关键字参数“check\u hash”

Python ResNeSt问题:从\u url()加载\u state\u dict\u时遇到意外的关键字参数“check\u hash”,python,deep-learning,fast-ai,Python,Deep Learning,Fast Ai,我已经在fastai中运行了ResNeSt模型,但我遇到了一个问题 learn=fastai.vision.cnn\u learnerdata,resnest50pretrained=True,metrics=[准确度] 错误在这里: TypeError Traceback (most recent call last) <ipython-input-4-cff6dd69b503> in <module> -

我已经在fastai中运行了ResNeSt模型,但我遇到了一个问题

learn=fastai.vision.cnn\u learnerdata,resnest50pretrained=True,metrics=[准确度]

错误在这里:

TypeError                                 Traceback (most recent call last)
<ipython-input-4-cff6dd69b503> in <module>
----> 1 learn = fastai.vision.cnn_learner(data, resnest50(pretrained=True), metrics=[accuracy])

F:\Program Files\Python\lib\site-packages\resnest\torch\resnest.py in resnest50(pretrained, root, **kwargs)
     38     if pretrained:
     39         model.load_state_dict(torch.hub.load_state_dict_from_url(
---> 40             resnest_model_urls['resnest50'], progress=True, check_hash=True))
     41     return model
     42 

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

Thanks for your help!


好的,我已经检查了我的pytorch源代码,我发现我的PC中的load_state_dict_from_url的代码与官方代码不同。我认为这是一个版本问题。我不知道我是否需要升级我的pytorch版本。如果我的cuda与新torch不兼容?

我们最近更新了模型URL,请安装最新版本的ResNeSt

pip install resnest --pre