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
6d346281
Unverified
Commit
6d346281
authored
Aug 18, 2020
by
Zihao Ye
Committed by
GitHub
Aug 18, 2020
Browse files
upd (#2043)
parent
1a1f38e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
examples/pytorch/gat/train_ppi.py
examples/pytorch/gat/train_ppi.py
+2
-1
No files found.
examples/pytorch/gat/train_ppi.py
View file @
6d346281
...
@@ -119,7 +119,8 @@ def main(args):
...
@@ -119,7 +119,8 @@ def main(args):
test_score_list
=
[]
test_score_list
=
[]
for
batch
,
subgraph
in
enumerate
(
test_dataloader
):
for
batch
,
subgraph
in
enumerate
(
test_dataloader
):
subgraph
=
subgraph
.
to
(
device
)
subgraph
=
subgraph
.
to
(
device
)
test_score_list
.
append
(
evaluate
(
subgraph
.
ndata
[
'feat'
],
model
,
subgraph
,
subgraph
.
ndata
[
'label'
],
loss_fcn
))
score
,
test_loss
=
evaluate
(
subgraph
.
ndata
[
'feat'
],
model
,
subgraph
,
subgraph
.
ndata
[
'label'
],
loss_fcn
)
test_score_list
.
append
(
score
)
print
(
"Test F1-Score: {:.4f}"
.
format
(
np
.
array
(
test_score_list
).
mean
()))
print
(
"Test F1-Score: {:.4f}"
.
format
(
np
.
array
(
test_score_list
).
mean
()))
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
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