Hello, I’m quite new to dgl, therefore I have a question, hope you don’t mind
Imagine, having a graphs with weights implemented in networkx and also the corresponding labels for them (let’s say stored in a list).
import networkx as nx
import dgl
import torch
labels = [0,1]
G1=nx.Graph()
G1.add_edge(0,1,weight=0.1)
G1.add_edge(0,2,weight=0.2)
G1.add_edge(2,3,weight=0.3)
G2=nx.Graph()
G2.add_edge(0,2,weight=0.4)
G2.add_edge(0,1,weight=0.5)
G2.add_edge(0,3,weight=0.6)
dgl_G1 = dgl.DGLGraph()
dgl_G1.from_networkx(G1, edge_attrs=['weight'])
dgl_G2 = dgl.DGLGraph()
dgl_G2.from_networkx(G2, edge_attrs=['weight'])
Is it somehow possible to assign labels to the dgl.DGLGraph() graph when it is already created (as in the example above)? Many thanks!