Skip to content

Commit

Permalink
[Bugfix] removing non-determinism in data loading (dmlc#413)
Browse files Browse the repository at this point in the history
[Bugfix] Removing non-determinism in data loading
  • Loading branch information
BarclayII authored and jermainewang committed Feb 26, 2019
1 parent 565f0c8 commit c07ae34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/dgl/data/citation_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def _normalize(mx):
return mx

def _encode_onehot(labels):
classes = set(labels)
classes = list(sorted(set(labels)))
classes_dict = {c: np.identity(len(classes))[i, :] for i, c in
enumerate(classes)}
labels_onehot = np.array(list(map(classes_dict.get, labels)),
Expand Down

0 comments on commit c07ae34

Please sign in to comment.