nip.graph_isomorphism.dataset_generation._generate_non_isomorphic_graphs#
- nip.graph_isomorphism.dataset_generation._generate_non_isomorphic_graphs(config: GraphIsomorphicDatasetConfig, batch_size: int, device: device | str | int) tuple[Int32[Tensor, 'pair batch node1 node2'], Int32[Tensor, 'batch'], Int32[Tensor, 'batch']] [source]#
Generate non-isomorphic graphs.
- Parameters:
config (GraphIsomorphicDatasetConfig) – The configuration for the dataset.
batch_size (int) – The number of pairs of graphs to generate.
device (TorchDevice) – The device to use for the computation. Note that all returned tensors will be on the CPU.
- Returns:
adjacencies (Int32[Tensor, “pair batch node1 node2”], device=”cpu”) – The batch of adjacency matrices for the generated graphs.
sizes (Int32[Tensor, “batch”], device=”cpu”) – The number of nodes in each graph.
scores (Int32[Tensor, “batch”], device=”cpu”) – The Weisfeiler-Lehman scores for each pair of graphs.