Closed UNOCLOCK closed 1 year ago
本代码所用的timm版本为0.6.7,timm库从 0.6.X -> 0.9.X 的更新过程中增加了大量新特性,请降级至0.6.X后再重试。
The version of timm used in this code is 0.6.7. A lot of new features were added during the update of timm library from 0.6.X -> 0.9.X. Please downgrade to 0.6.X and try again.
应该是版本的问题,我重新创建conda虚拟环境并使用timm==0.6.7之后,果然成功了,谢谢你!
It should be a version issue. After recreating the Conda virtual environment and using tim=0.6.7, I succeeded. Thank you!
我在运行python U1652_bert.py的时候会提示以下的错误,经过google之后发现原因可能是:1)文件或者函数的命名问题;2)timm的版本问题,但是作者自己是能正常使用的,所以我想原因可能是后者。如果您也遇到过类似的问题请不吝赐教!
I am running Python U1652_ When Bert.py is running, it will prompt the following error. After Google, it was found that the reason may be 1) a naming issue with the file or function, or 2) a version issue with Timm, but the author is able to use it normally, so I think the reason may be the latter. If you have encountered similar problems, please feel free to give me your advice!
ImportError: cannot import name 'get_pretrained_cfg' from 'timm.models.registry' (C:\ProgramData\Anaconda3\envs\MBF\lib\site-packages\timm\models\registry.py)