参考:https://blog.csdn.net/YPP0229/article/details/106328173/
- pycharm执行代码出现错误
No module named 'torch_sparse’
- 解决办法
- https://pytorch-geometric.com/whl/,在这里找到自己pytorch对应的版本,下载.whl
- 直接在下载的路径执行 pip install xxx.whl即可
参考:https://github.com/cornellius-gp/gpytorch/issues/1305
- pycharm执行代码出现错误
RuntimeError: value cannot be converted to type int64_t without overflow: inf
- 解决办法
- We should never have Parameters that are ints, so I agree that the obvious solution here is to just cast the bounds to floats upon initialization.
- 把x矩阵设成float值。
参考:https://pytorch-geometric.readthedocs.io/en/latest/modules/data.html
- 自建数据分train、val、test部分训练的时候得到的准确率大于1了,我怀疑读数有问题,仔细查看文档,是因为我把data.train_mask/val_mask/test_mask的dtype都设置成了torch.long,应该设置成torch.bool