Batch training on 'ogbn-mag' dataset

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!!

You may find this example helpful: https://github.com/dmlc/dgl/blob/master/examples/pytorch/ogb/ogbn-mag/hetero_rgcn.py

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.