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
1f4c0b71
"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "565f8a3c441b2af51da7277be1b07e6a6d3cfc09"
Unverified
Commit
1f4c0b71
authored
Apr 01, 2021
by
milesial
Committed by
GitHub
Apr 01, 2021
Browse files
Fix processing of QM9EdgeDataset (#2801)
parent
e36c5db6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
18 deletions
+2
-18
python/dgl/data/qm9_edge.py
python/dgl/data/qm9_edge.py
+2
-18
No files found.
python/dgl/data/qm9_edge.py
View file @
1f4c0b71
...
...
@@ -135,7 +135,7 @@ class QM9EdgeDataset(DGLDataset):
raw_dir
=
None
,
force_reload
=
False
,
verbose
=
True
):
if
label_keys
==
None
:
if
label_keys
is
None
:
self
.
label_keys
=
None
self
.
num_labels
=
19
else
:
...
...
@@ -157,23 +157,7 @@ class QM9EdgeDataset(DGLDataset):
download
(
self
.
_url
,
path
=
file_path
)
def
process
(
self
):
npz_path
=
f
'
{
self
.
raw_dir
}
/qm9_edge.npz'
data_dict
=
np
.
load
(
npz_path
,
allow_pickle
=
True
)
self
.
n_node
=
data_dict
[
'n_node'
]
self
.
n_edge
=
data_dict
[
'n_edge'
]
self
.
node_attr
=
data_dict
[
'node_attr'
]
self
.
node_pos
=
data_dict
[
'node_pos'
]
self
.
edge_attr
=
data_dict
[
'edge_attr'
]
self
.
target
=
data_dict
[
'target'
]
self
.
src
=
data_dict
[
'src'
]
self
.
dst
=
data_dict
[
'dst'
]
self
.
n_cumsum
=
np
.
concatenate
([[
0
],
np
.
cumsum
(
self
.
n_node
)])
self
.
ne_cumsum
=
np
.
concatenate
([[
0
],
np
.
cumsum
(
self
.
n_edge
)])
self
.
load
()
def
has_cache
(
self
):
npz_path
=
f
'
{
self
.
raw_dir
}
/qm9_edge.npz'
...
...
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