CogDL icon indicating copy to clipboard operation
CogDL copied to clipboard

节点特征

Open Flians opened this issue 2 years ago • 2 comments

❓ 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): Assertion B.dtype() == torch::kFloat32 || B.dtype() == torch::kFloat16' failed.`

请问有什么解决方法吗?

Flians avatar Jul 27 '23 10:07 Flians

可以把特征转成FloatTensor来试试

cenyk1230 avatar Jul 28 '23 06:07 cenyk1230

可以把特征转成FloatTensor来试试

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

Flians avatar Jul 28 '23 12:07 Flians