0
点赞
收藏
分享

微信扫一扫

RuntimeError: Bool type is not supported by dlpack



问题背景:图学习/节点预测,使用dgl加载Reddit数据集,遇到报错​​RuntimeError: Bool type is not supported by dlpack​RuntimeError: Bool type is not supported by dlpack_pytorch


分析

报错的内容说是​​dlpack不支持Bool类型​​,类型不支持,可能是版本问题,但是我用的是Colab,环境不是自己搭建的,不好追溯。

检索

  1. GitHub项目Issue

相同问题:​​https://github.com/dmlc/dgl/issues/3591​​

解决方案:测试环境发生错误,具体错误未提及。

  1. Stack Overflow

相同问题:​​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

成功解决!


举报

相关推荐

0 条评论