1.pip uninstall torchcrf //首先卸掉以前的torchcrf包
2.pip install pytorch-crf -i https://pypi.tuna.tsinghua.edu.cn/simple/ //再安装
3.再导入
from torchcrf import CRF
————————————————
原文链接:https://blog.csdn.net/weixin_43332715/article/details/123510434
1.pip uninstall torchcrf //首先卸掉以前的torchcrf包
2.pip install pytorch-crf -i https://pypi.tuna.tsinghua.edu.cn/simple/ //再安装
3.再导入
from torchcrf import CRF
————————————————
原文链接:https://blog.csdn.net/weixin_43332715/article/details/123510434