tf.random.set_seed (seed-seed) 1) # QUESTION 5: Only for this question use the TUDataset instead of the GraphSage # (for
Posted: Sun May 15, 2022 10:11 am
tf.random.set_seed (seed-seed) 1) # QUESTION 5: Only for this question use the TUDataset instead of the GraphSage # (for all other questions use GraphSage). For the TUDataset, print out the number # of graphs, nodes, features, node labels, classification labels and edge features. dataset - Graphs age('PPI', transforma-LayerPreprocess (GCNConv)) #dataset - Tudataset('PROTEINS', transforms-[LayerPreprocess (GCNCorv) 1) THIS CODE WILL BE USED FOR ANSWERING QUESTION 5 ABOVE print(len(dataset.graphs)) graph dataset.graphs01 print("\n---- Number of nodes ----") print (graph.n_nodes) print("\n---- Nodes features ----") print(len (graph.)) print (graph.x[0]) print(len (graph.X[0])) print("\n--- Node labels ----" print(len (graphy)) print (graph.y101) print(lon graph.Y[0])) e print("\n---- Edge features)
# THIS CODE WILL BE USED FOR ANSWERING QUESTION 5 ABOVE {x) print(len(dataset.graphs)) graph-dataset.graphs[0] print("\n---- Number of nodes ----") print(graph.n_nodes) I print("\n---- Nodes features ----") print(len (graph.x)) print (graph.x[0]) print(len (graph.x[0])) print("\n---- Node labels ----") print(len (graph.y)) print (graph.yo) print(len (graph.y101)) print("\n---- Edge features ----") print (graph.e) print("\n---- Number of classification labels in the dataset ----") print(dataset.n_labels) WE print("\n--- Adjancency matrix ----> print(graph. a)
tf.random.set_seed (seed-seed) #S For the TuDataset, print out the number # of graphs, nodes, features, node labels, classification labels and edge features. dataset - GraphSage (PPT', transforms-Layer Preprocess (GCNCON) 1)
# THIS CODE WILL BE USED FOR ANSWERING QUESTION 5 ABOVE {x) print(len(dataset.graphs)) graph-dataset.graphs[0] print("\n---- Number of nodes ----") print(graph.n_nodes) I print("\n---- Nodes features ----") print(len (graph.x)) print (graph.x[0]) print(len (graph.x[0])) print("\n---- Node labels ----") print(len (graph.y)) print (graph.yo) print(len (graph.y101)) print("\n---- Edge features ----") print (graph.e) print("\n---- Number of classification labels in the dataset ----") print(dataset.n_labels) WE print("\n--- Adjancency matrix ----> print(graph. a)
tf.random.set_seed (seed-seed) #S For the TuDataset, print out the number # of graphs, nodes, features, node labels, classification labels and edge features. dataset - GraphSage (PPT', transforms-Layer Preprocess (GCNCON) 1)