I am instantiating my DGL heterograph for two objects (streets and buildings) that possess two different relations (intersects and within) as follows:
dgl_heterograph = dgl.heterograph(
{
("building", "within", "street"): within_tuple_list,
("street", "intersects", "building"): intersects_tuple_list,
}
)
Where within_tuple_list
and intersects_tuple_list
are list of tuples denoting the edges between the objects.
When I print the graph_object, I get:
Graph(num_nodes={'building': 18233, 'street': 19630}, num_edges={('building', 'within', 'street'): 1391319, ('street', 'intersects', 'building'): 29}, metagraph=[('building', 'street', 'within'), ('street', 'building', 'intersects')])
The number of buildings is 18233
and streets is 29
but this does not correspond to what is instantiated ( see num_nodes
). I am doing something wrong, any help will be greatly appreciated. Thanks in advance.