Hi,
I have built a heterograph with just one node type and 158 edge types. When I do hetero_graph.ntype
, I get [0] as an output but when I try to assign a feature to all nodes using
hetero_graph.nodes[0].data['feature'] = torch.randn(n_nodes, n_hetero_features)
I get an error,
DGLError: Expect number of features to match number of nodes (len(u)). Got 85938 and 1 instead.
Is there anything that I am missing here? I think nodes[0]
is trying to assign a feature to only first node instead of all 85938 nodes, is there any way to overcome this or rename the node types perhaps?
Thanks in Advance!