RuntimeError: Bool type is not supported by dlpack
生活随笔
收集整理的這篇文章主要介紹了
RuntimeError: Bool type is not supported by dlpack
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題背景:圖學習/節點預測,使用dgl加載Reddit數據集,遇到報錯RuntimeError: Bool type is not supported by dlpack
分析
報錯的內容說是dlpack不支持Bool類型,類型不支持,可能是版本問題,但是我用的是Colab,環境不是自己搭建的,不好追溯。
檢索
相同問題:https://github.com/dmlc/dgl/issues/3591
解決方案:測試環境發生錯誤,具體錯誤未提及。
相同問題:https://stackoverflow.com/questions/69937348/how-to-fix-runtimeerror-bool-type-is-not-supported-by-dlpack
解決方案:pytorch版本與dgl版本不匹配,需要對pytorch進行降級
!pip install dgl==0.6.1 !pip install torch==1.9.1成功解決!
總結
以上是生活随笔為你收集整理的RuntimeError: Bool type is not supported by dlpack的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LeetCode Algorithm L
- 下一篇: LeetCode Algorithm 5