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
a0730530
"docs/git@developer.sourcefind.cn:OpenDAS/fairscale.git" did not exist on "1ece280a63c1d68840e58fdfb0e18dbff9cda438"
Unverified
Commit
a0730530
authored
Mar 22, 2023
by
Mufei Li
Committed by
GitHub
Mar 22, 2023
Browse files
Update main.py (#5460)
parent
4534650f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/pytorch/ogb/seal_ogbl/main.py
examples/pytorch/ogb/seal_ogbl/main.py
+3
-3
No files found.
examples/pytorch/ogb/seal_ogbl/main.py
View file @
a0730530
...
@@ -463,12 +463,12 @@ if __name__ == "__main__":
...
@@ -463,12 +463,12 @@ if __name__ == "__main__":
# reconstruct the graph for ogbl-collab data for validation edge augmentation and coalesce
# reconstruct the graph for ogbl-collab data for validation edge augmentation and coalesce
if
args
.
dataset
==
"ogbl-collab"
:
if
args
.
dataset
==
"ogbl-collab"
:
graph
.
edata
.
pop
(
"year"
)
# float edata for to_simple transform
graph
.
edata
[
"weight"
]
=
graph
.
edata
[
"weight"
].
to
(
torch
.
float
)
if
args
.
use_valedges_as_input
:
if
args
.
use_valedges_as_input
:
val_edges
=
split_edge
[
"valid"
][
"edge"
]
val_edges
=
split_edge
[
"valid"
][
"edge"
]
row
,
col
=
val_edges
.
t
()
row
,
col
=
val_edges
.
t
()
# float edata for to_simple transform
graph
.
edata
.
pop
(
"year"
)
graph
.
edata
[
"weight"
]
=
graph
.
edata
[
"weight"
].
to
(
torch
.
float
)
val_weights
=
torch
.
ones
(
size
=
(
val_edges
.
size
(
0
),
1
))
val_weights
=
torch
.
ones
(
size
=
(
val_edges
.
size
(
0
),
1
))
graph
.
add_edges
(
graph
.
add_edges
(
torch
.
cat
([
row
,
col
]),
torch
.
cat
([
row
,
col
]),
...
...
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