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
c3a043eb
Unverified
Commit
c3a043eb
authored
Aug 23, 2023
by
xiangyuzhi
Committed by
GitHub
Aug 23, 2023
Browse files
[Sparse] Fix hetero-rgcn example datasets (#6200)
parent
b1153db9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
examples/sparse/hetero-rgcn.py
examples/sparse/hetero-rgcn.py
+1
-5
No files found.
examples/sparse/hetero-rgcn.py
View file @
c3a043eb
...
...
@@ -182,12 +182,8 @@ def main(args):
# Load graph data.
if
args
.
dataset
==
"aifb"
:
dataset
=
AIFBDataset
()
elif
args
.
dataset
==
"mutag"
:
dataset
=
MUTAGDataset
()
elif
args
.
dataset
==
"bgs"
:
dataset
=
BGSDataset
()
elif
args
.
dataset
==
"am"
:
dataset
=
AMDataset
()
else
:
raise
ValueError
()
...
...
@@ -238,7 +234,7 @@ def main(args):
# Training loop.
print
(
"start training..."
)
model
.
train
()
for
epoch
in
range
(
2
0
):
for
epoch
in
range
(
1
0
):
optimizer
.
zero_grad
()
logits
=
model
(
A
)[
category
]
loss
=
F
.
cross_entropy
(
logits
[
train_idx
],
labels
[
train_idx
])
...
...
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