HeterSumGraph icon indicating copy to clipboard operation
HeterSumGraph copied to clipboard

需要将G.to_device("cuda")改为G=G.to_device("cuda")

Open Carol-gutianle opened this issue 2 years ago • 1 comments

运行过程中,好像需要将G.to_device("cuda")改为G=G.to_device("cuda"),否则会报错RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)。不知道是不是我自己的原因。

Carol-gutianle avatar Nov 23 '22 13:11 Carol-gutianle

我也遇到了相同的问题,然后通过改为G=G.to_device("cuda") 解决了

zhaotl4 avatar Apr 10 '23 03:04 zhaotl4