GAT icon indicating copy to clipboard operation
GAT copied to clipboard

Why use (adj.col, adj.row) instead of (adj.row, adj.col), the accuracy is higher?

Open LeungH opened this issue 4 years ago • 1 comments

Hi, Petar

Thanks for your great works!

I have some questions about the function preprocess_adj_bias() in utils/process.py

indices = np.vstack((adj.col, adj.row)).transpose() # This is where I made a mistake, I used (adj.row, adj.col) instead

I did some experiment, I can't understand why use (adj.col, adj.row) instead of (adj.row, adj.col), the accuracy is higher. Could you explain? Thanks a lot!

LeungH avatar Dec 17 '19 11:12 LeungH

For anyone who is also confused, all sparse operations assume that the sparse tensor is row-major ordering, while (adj.row, adj.col) in numpy is column-major ordering. Thus, we need to use (adj.col, adj.row).

llan-ml avatar Mar 22 '20 13:03 llan-ml