在执行iNltk库时,我得到一个错误。我有最新版本的pytorch和torchvision。
'LSTM' object has no attribute '_flat_weights_names'在一些博客上重新搜索后,一些人建议将版本降级到1.2,所以我从https://pytorch.org/get-started/previous-versions/尝试了下面的安装
pip install torch==1.2.0+cu92 torchvision==0.4.0+cu92 -f https://download.pytorch.org/whl/torch_stable.html但是,获取错误
ERROR: Could not find a version that satisfies the requirement torch==1.2.0+cpu
ERROR: No matching distribution found for torch==1.2.0+cpu此外,还缺少1.3.1版本。
有谁知道如何降级到1.3.1或1.2.0?
提前感谢
PD
发布于 2021-04-24 07:28:10
我试着使用pip,但对我不起作用。conda修复了该问题。
首先设置conda环境并将其激活。在conda中使用pip安装iNLTK,如下所示:
pip install inltk删除作为iNLTK依赖项安装的PyTorch版本。
pip uninstall torch安装所需版本的PyTorch。
conda install pytorch==1.3.0 -c pytorchhttps://stackoverflow.com/questions/66478043
复制相似问题