This example is :
g = dgl.heterograph({ … (‘drug’, ‘interacts’, ‘drug’): (th.tensor([0, 1]), th.tensor([1, 2])), … (‘drug’, ‘treats’, ‘disease’): (th.tensor([1]), th.tensor([2]))}) >>> g.nodes[‘drug’].data[‘hv’] = th.zeros(3, 1) >>> g.nodes[‘disease’].data[‘hv’] = th.ones(3, 1) >>> g.edges[‘interacts’].data[‘he’] = th.zeros(2, 1) >>> g.edges[‘treats’].data[‘he’] = th.zeros(1, 2)
The question is : the number of ‘disease’ nodes is 2, why do we should write ‘th.zeros(3, 1)’