The ‘data’ object was created by an older version of PyG. If this error occurred while loading ...
目前使用PyG库需要的下载的whl主要为torch-cluster;一开始以为是pickle的问题,实际上最终就是torch-geometric版本不对的问题。也就是原因:torch和torch-geometric版本不兼容造成的。torch-sparse后,所有教程都是直接:pip install torch-geometric。这时候安装的 torch-geometric2.0.X版本的,这时
The ‘data’ object was created by an older version of PyG. If this error occurred while loading an already existing dataset, remove the ‘processed/’ directory in the dataset’s root folder and try again.”
但实际上data中没有processed文件(data中的数据为pkl格式)
一开始以为是pickle的问题,实际上最终就是torch-geometric版本不对的问题。也就是原因:torch和torch-geometric版本不兼容造成的。先对其他安装进行说明:
目前使用PyG库需要的下载的whl主要为torch-cluster;torch-scatter;torch-scatter;torch-sparse;torch-spline-conv,下载方式很多教程里都有。
主要从这里下载:(先检查电脑的torch和cuda版本)
https://data.pyg.org/whl/torch-1.6.0%2Bcu102.html
在安装完相应版本的torch-cluster;torch-scatter;torch-sparse后,所有教程都是直接:pip install torch-geometric
这时候安装的 torch-geometric2.0.X版本的,这时候读取数据就会出现上面所述的错误,此时我们需要下载1.X.X低版本的 torch-geometric。
本文以下载1.6.0为例:

安装这个torch-geometric==1.6.0版本后,就不会报上面那个错误了。
更多推荐



所有评论(0)