THUDM / CogDL

CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2023)
https://cogdl.ai
MIT License
1.73k stars 314 forks source link

节点特征 #433

Open Flians opened 1 year ago

Flians commented 1 year ago

❓ Questions & Help

你好!请问我自定义的图数据集里面,节点特征为categorical,然后我使用了one-hot编码,使用experiment(model="gin", dataset=dataset)训练时,显示如下错误: cogdl/operators/spmm/spmm.cpp:39: at::Tensor csr_spmm(at::Tensor, at::Tensor, at::Tensor, at::Tensor): AssertionB.dtype() == torch::kFloat32 || B.dtype() == torch::kFloat16' failed.`

请问有什么解决方法吗?

cenyk1230 commented 1 year ago

可以把特征转成FloatTensor来试试

Flians commented 1 year ago

可以把特征转成FloatTensor来试试

谢谢了,准确率比较低,不知道是我自己数据的问题