nip.graph_isomorphism.dataset_generation.shuffle_adjacencies

nip.graph_isomorphism.dataset_generation.shuffle_adjacencies#

nip.graph_isomorphism.dataset_generation.shuffle_adjacencies(adjacencies: Int32[Tensor, '... node1 node2'], sizes: Int32[Tensor, '...']) Int32[Tensor, '... node1 node2'][source]#

Shuffle the nodes in a batch of adjacency matrices of varying sizes.

Allows for arbitrary batch dimensions.

Parameters:
  • adjacencies (Int32[Tensor, "... node1 node2"]) – The batch of adjacency matrices to shuffle.

  • sizes (Int32[Tensor, "..."]) – The number of nodes in each graph.

Returns:

adjacencies (Int32[Tensor, “… node1 node2”]) – The batch of adjacency matrices with the nodes shuffled.