-
I attempted to modify the GCN layer that I created to work with adjacency sparse COOrdinate format. My understanding is that there should be no difference in the output of the model with adjacency matrix in dense or parse COOrdinate format However, I see different outputs. I am pasting my code for the GCN layer that stores the adjacency matrix based on "sparse" parameter to the constructor. Can you please check if I have correctly implemented the aggregation of nodes using adjacency matrix is sparse COOrdinate format correctly? I have printed the inputs and outputs of all the functions used in the _aggregate function and they seem to be fine to me, unless I have misunderstood the concept somehow. Then if I print the output of the _aggregate function, I get different values of the aggregated features between sparse and dense formats, though I am not able to find why. I even tried to sort the receiver_nodes and used segment_sum, yet the value of the aggregated features are different from the values of their values when the layer uses dense adjacency matrix
When sparse parameter to GCNLayer is "False", the output is as expected:
When the sparse is "True", the validation accuracy seems to worsen with time, and training accuracy increases too rapidly ( when I expected it to be same as above )
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found the the issue. The segment_sum had to be done on receiver nodes while the tf_gather had to be done on sendernodes. I was doing both on the receiver nodes which was causing the issue. The issue is now resolved. |
Beta Was this translation helpful? Give feedback.
I found the the issue. The segment_sum had to be done on receiver nodes while the tf_gather had to be done on sendernodes. I was doing both on the receiver nodes which was causing the issue. The issue is now resolved.