Hi all,
I have a graph g and in this graph, I have node features. I want to add nodes to this graph and add the features of the nodes at the same time. I am trying to use :
g.add_nodes(1, {‘features’: torch.tensor([i for i in range(21)], dtype = torch.float64)})
But it does not work, i have the following issue :
DGLError: Cannot update column of scheme Scheme(shape=(), dtype=torch.float32) using feature of scheme Scheme(shape=(21,), dtype=torch.float32).
I want to point out that my features tensor of the initial graph has 21 columns.
Have you an idea of how to add node to an existing graph and modifying the g.ndata[‘features’] with the features of the new nodes?
Thank you all !