保留现场
……
探究原因
pytorch、torchvision版本太新,需要降到torch==1.3.1
解决方法
pip3 install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html
但是会报错如下:
Could not find a version that satisfies the requirement torch==1.3.1+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.3.1.+cpu
这是因为python版本不匹配,我用的是Python3.8,需要降到Python3.7!
最后
以上就是隐形手机最近收集整理的关于Pytorch报错:LSTM object has no attribute ‘_flat_weights‘的全部内容,更多相关Pytorch报错:LSTM内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复