1.pip uninstall torchcrf //首先卸掉以前的torchcrf包

2.pip install pytorch-crf -i https://pypi.tuna.tsinghua.edu.cn/simple/   //再安装

3.再导入

from torchcrf import CRF

参考资料

(292条消息) torchcrf from torchcrf import CRF_nlp_qidian的博客-CSDN博客_torchcrf

(292条消息) from torchcrf import CRF报错_爱摸鱼的ZZ的博客-CSDN博客_torchcrf 报错

Logo

更多推荐