Computing pairwise dot product for all nodes

I would like to calculate pairwise dot products across every node in each graph in a batch. I was going to make the graph complete and use apply_edges, but completing the graph by looping through it seemed cumbersome. My other thought was just keeping track of all the sub graphs in the batch and dot together their node features.

Does anyone have any slicker ways to do it?

Thank you!


I would recommend to unbatch the whole graph and loop through each one to calculate the result your want.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.