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

edge_weight in GAT #38

Open
iknoorjobs opened this issue Jan 2, 2022 · 2 comments
Open

edge_weight in GAT #38

iknoorjobs opened this issue Jan 2, 2022 · 2 comments

Comments

@iknoorjobs
Copy link

iknoorjobs commented Jan 2, 2022

Hi,

I see edge_weight can be used in GCN. Please tell how to use edge_weight in GAT?

Here (link) it's mentioned that "Note that the edge_weight will not be used."

Thanks

@iknoorjobs
Copy link
Author

iknoorjobs commented Jan 2, 2022

Also, please tell if we can have multi-dimensional edge weights. For example, using 2-dimensional edge_weight in the GCN example, it gives an error.

x = np.random.randn(5, 20).astype(np.float32)  # 5 nodes, 20 features
edge_index = np.array([
    [0, 0, 1, 3],
    [1, 2, 2, 1]
])
edge_weight = np.array([[0.9,0.5], [0.8,0.5], [0.1,0.5], [0.2,0.5]]).astype(np.float32)

Thanks

@hujunxianligong
Copy link
Member

  1. the edge_weight is not used by the GAT algorithm.
  2. If you want to custom a special edge_weight, you can just custom your tfg GNN model and use it as a common input argument of the call method.

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