I have a dataset of heterogeneous graphs with several node types and edge types.
Not all every graph got every types.
i tried this tutorial: https://docs.dgl.ai/guide/training-graph.html#guide-training-graph-classification
and specifically tried to use the
HeteroClassifier described here: https://docs.dgl.ai/guide/training-graph.html#heterogeneous-graph.
in get an exception in this line:
hg = hg + dgl.mean_nodes(g, 'h', ntype=ntype)
The exception is:
RuntimeError: The size of tensor a (50) must match the size of tensor b (64) at non-singleton dimension 0
and after a little debugging I noticed that the size of the output of dgl.mean_nodes is as the number of graphs that had the specific ntype.
is that as expected?
what is your suggestion if not all of my graphs has all of the ntypes?