[Pytorch] Error:module ‘torch‘ has no attribute ‘logical_and‘

最近学习的模型用到了这个逻辑与的操作,Pytorch 1.3.x报错。
查阅官方文档,只有logical_not和logical_xor的实现。
但在1.9的文档中有logical_and
遂查阅相关更新,得知logical_and在1.5之后的新功能,
pytorch更新到>=1.5即可解决问题。

1.3.1搜索结果
[Pytorch] Error:module ‘torch‘ has no attribute ‘logical_and‘_第1张图片
1.5.1搜索结果
[Pytorch] Error:module ‘torch‘ has no attribute ‘logical_and‘_第2张图片

你可能感兴趣的:(杂记,pytorch,深度学习,神经网络)