Sparse tensor
bousejin opened this issue · comments
Nima commented
Hi, Bumsoo. Thank you for your great tutorial. I am experimenting with your attention code and got this error:
attention = torch.where(adj > 0, e, zero_vec)
RuntimeError: _th_gt is not implemented for type torch.sparse.FloatTensor
Do you have any idea to get rid of this error?
Bumsoo Kim commented
Hi,
First of all, thank you for your compliment! :)
Would you try converting the tensor back to being dense by applying
adj.to_dense()
?
Nima commented
You're welcome. Thank you so much for your help. Nice solution!