Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
c07ae34a
Commit
c07ae34a
authored
Feb 26, 2019
by
Quan (Andy) Gan
Committed by
Minjie Wang
Feb 26, 2019
Browse files
[Bugfix] removing non-determinism in data loading (#413)
[Bugfix] Removing non-determinism in data loading
parent
565f0c88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/dgl/data/citation_graph.py
python/dgl/data/citation_graph.py
+1
-1
No files found.
python/dgl/data/citation_graph.py
View file @
c07ae34a
...
...
@@ -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
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment