Unverified Commit f1e4f378 authored by Mohammad Amin Khashkhashi Moghaddam's avatar Mohammad Amin Khashkhashi Moghaddam Committed by GitHub
Browse files

Fix bug in using degree_as_nlabel for GIN dataset (#1451)



In order to make the `label2idx` dictionary, tensor values should be used and not the tensor itself.
Co-authored-by: default avatarJinjing Zhou <VoVAllen@users.noreply.github.com>
parent 05b0f1ea
...@@ -220,7 +220,7 @@ class GINDataset(object): ...@@ -220,7 +220,7 @@ class GINDataset(object):
# but usually no features means no labels, fine. # but usually no features means no labels, fine.
g.ndata['label'] = g.in_degrees() g.ndata['label'] = g.in_degrees()
# extracting unique node labels # extracting unique node labels
nlabel_set = nlabel_set.union(set(g.ndata['label'])) nlabel_set = nlabel_set.union(set([F.as_scalar(nl) for nl in g.ndata['label']]))
nlabel_set = list(nlabel_set) nlabel_set = list(nlabel_set)
# in case the labels/degrees are not continuous number # in case the labels/degrees are not continuous number
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment