天天看點

[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.5.1搜尋結果

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

繼續閱讀