[Doc]modify the wrong code in initialize the hetero_graph negative sampler (#2382) (#2411)
* 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>
Showing
Please register or sign in to comment