[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搜索结果
在这里插入图片描述
1.5.1搜索结果
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/ftimes/article/details/120249864
今日推荐