You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use a graph inside an existing model. I have an adjacency matrix that I generated from networkx and converted using edge_index = adjacency_matrix.nonzero().t().contiguous(). The features for the GCNConv layer initial have a batch dimension, but I'm unsure if this is still necessary. The documentation for the GCNConv layer is |V|, F_in in shape, so does this mean that the different batches should be concatenated together in some way?
One way I have thought about this is applying adjacency_matrix = torch.block_diag(*[adjacency_matrix[b_idx] for b_idx in range(batch_size)]) to the different batched adjacency matries and flattening the input features to a correspond with this adjacency matrix. Is this the right approach to deal with the batch dimensions?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to use a graph inside an existing model. I have an adjacency matrix that I generated from
networkx
and converted usingedge_index = adjacency_matrix.nonzero().t().contiguous()
. The features for theGCNConv
layer initial have a batch dimension, but I'm unsure if this is still necessary. The documentation for theGCNConv
layer is|V|, F_in
in shape, so does this mean that the different batches should be concatenated together in some way?One way I have thought about this is applying
adjacency_matrix = torch.block_diag(*[adjacency_matrix[b_idx] for b_idx in range(batch_size)])
to the different batched adjacency matries and flattening the input features to a correspond with this adjacency matrix. Is this the right approach to deal with the batch dimensions?Beta Was this translation helpful? Give feedback.
All reactions