Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LeungH opened this issue Dec 17, 2019 · 1 comment

Comments

@LeungH
Copy link

LeungH commented Dec 17, 2019

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!

@llan-ml
Copy link

llan-ml commented Mar 22, 2020

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).

PanYicheng pushed a commit to PanYicheng/GAT that referenced this issue Nov 6, 2020
…yer_forward

Make _prepate_attentional_mechanism_input a bit more readable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants