* Fix examples on negative graph sampler
In heterogeneous graph, the old example may build a negative graph without edges. In dgl.dataloading.dataloader line637, it shows the key of neg_edges dict should be item in g.canonical_etypes.
* poke ci
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
* modify the wrong code in initialize the hetero_graph negative sampler
the etype in hetero graph should be name of edges
self.weights = {
etype: g.in_degrees(etype=etype).float() ** 0.75
for _, etype, _ in g.canonical_etypes
}
the original code will give etype a Tuple format, it cannot apply to the next processing:
self.weights[etype].multinomial(len(src), replacement=True)
and I add the part which confusing me to generate eid_dict
* fix
Co-authored-by: Quan Gan <coin2028@hotmail.com>
Co-authored-by: Shaow <coco11563@yeah.net>