def __init__(self, dataset, model, hidden_size, num_shuffle, seed, **model_args): assert model == "from_numpy_graph" dataset = create_graph_classification_dataset(dataset) self.num_nodes = dataset.graph_labels.shape[0] self.num_classes = dataset.num_labels self.label_matrix = np.zeros((self.num_nodes, self.num_classes), dtype=int) self.labels = dataset.graph_labels self.model = build_model(model, hidden_size, **model_args) self.hidden_size = hidden_size self.num_shuffle = num_shuffle self.seed = seed
def __init__( self, dataset, rw_hops=64, subgraph_size=64, restart_prob=0.8, positional_embedding_size=32, step_dist=[1.0, 0.0, 0.0], ): self.rw_hops = rw_hops self.subgraph_size = subgraph_size self.restart_prob = restart_prob self.positional_embedding_size = positional_embedding_size self.step_dist = step_dist self.entire_graph = True assert positional_embedding_size > 1 self.dataset = data_util.create_graph_classification_dataset(dataset) self.graphs = self.dataset.graph_lists self.length = len(self.graphs) self.total = self.length