Generating Attention Weights From GATCONV #4036
Answered
by
rusty1s
akul-goyal
asked this question in
Q&A
-
Hi, I am trying to understand the embedding of certain nodes within my graph. I am using a 2 layers Graph Attention Neural Network to create the embeddings. I want to find out the weights that are placed for each of the nodes within a k-hops of a target node. Is there a way for me to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
Feb 9, 2022
Replies: 1 comment 1 reply
-
You can get the attention-based adjacency matrix from |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
akul-goyal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can get the attention-based adjacency matrix from
GATConv
by making use ofreturn_attention_weights=True
in itsforward
call. Together withutils.k_hop_subgraph()
, you should be able to gather the weights of a node within its k-hop neighborhood.