Closed wenyuzzz closed 9 months ago
https://github.com/enoche/MMRec/blob/3de1ff73ba1cb32951c1e82077644cdc0436660d/src/models/freedom.py#L81-L83
When we create this graph using GPU, it may cause a problem like this:
sim size: torch.Size([63001, 63001]) sim dtype: torch.float32 knn_ind: tensor([[7585306885142836339, 3991370661542720611, 3486688227326894121, ..., 140594981698912, 140594981698912, 4294967295], [354038449242118, 1271310336001, 8387195064482211950, ..., 7957688336701796217, 8319958742476218724, 7795558767364238639], [ 3304159867, 0, 1, ..., 140588979432688, 140594973553136, 140588979527472], ..., [ 117, 117, 4473802540135219199, ..., 140594981698960, 140594981698960, 4294967295], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0]], device='cuda:2') knn_ind size: torch.Size([63001, 10])
But if we make this graph through cpu. This bug will disappear.
By default, the graph is created on GPU, no problem on my side, you may check you prepared data:
https://github.com/enoche/MMRec/blob/3de1ff73ba1cb32951c1e82077644cdc0436660d/src/models/freedom.py#L81-L83
When we create this graph using GPU, it may cause a problem like this:
sim size: torch.Size([63001, 63001]) sim dtype: torch.float32 knn_ind: tensor([[7585306885142836339, 3991370661542720611, 3486688227326894121, ..., 140594981698912, 140594981698912, 4294967295], [354038449242118, 1271310336001, 8387195064482211950, ..., 7957688336701796217, 8319958742476218724, 7795558767364238639], [ 3304159867, 0, 1, ..., 140588979432688, 140594973553136, 140588979527472], ..., [ 117, 117, 4473802540135219199, ..., 140594981698960, 140594981698960, 4294967295], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0]], device='cuda:2') knn_ind size: torch.Size([63001, 10])
But if we make this graph through cpu. This bug will disappear.