More than one graph features

I’ve just been doing the tutorials for DGL and noticed that for node features, when you assign them to ndata it is a dictionary. What is the standard practice here, if I had N nodes and two features for each node, would I assign ndata[‘feats’] = tensor(N,2) or would I have ndata[‘feat1’] = tensor(N), ndata[‘feat2’] = Tensor(N) – basically do I need each feature to have its own entry in the dictionary or are all features captured in one entry in one tensor?

You don’t need a separate entry for each feature unless they have different semantic meanings and you want to treat them separately.

1 Like