Hi,
as dgl docs said, if the features are stored in g.ndata
, then the labels can be loaded by accessing the features in blocks[-1].dstdata
like this:
input_features = blocks[0].srcdata['features']
output_labels = blocks[-1].dstdata['label']
But if the labels are not stored in g.ndata
and the labels can not be stored in g.ndata
manually, how can I load the labels like this output_labels = blocks[-1].dstdata['label']
?
PS. I work on ‘ogbn-mag’, a heterogeneous graph dataset.
Anyone help? Thanks!!