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
3ded3587
Unverified
Commit
3ded3587
authored
Feb 16, 2024
by
SuperYY
Committed by
GitHub
Feb 16, 2024
Browse files
fix epoch loss (#6319)
parent
13e7c2fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/pytorch/mvgrl/graph/main.py
examples/pytorch/mvgrl/graph/main.py
+2
-2
No files found.
examples/pytorch/mvgrl/graph/main.py
View file @
3ded3587
...
@@ -130,8 +130,8 @@ if __name__ == "__main__":
...
@@ -130,8 +130,8 @@ if __name__ == "__main__":
print
(
"Epoch {}, Loss {:.4f}"
.
format
(
epoch
,
loss_all
))
print
(
"Epoch {}, Loss {:.4f}"
.
format
(
epoch
,
loss_all
))
if
loss
<
best
:
if
loss
_all
<
best
:
best
=
loss
best
=
loss
_all
best_t
=
epoch
best_t
=
epoch
cnt_wait
=
0
cnt_wait
=
0
th
.
save
(
model
.
state_dict
(),
f
"
{
args
.
dataname
}
.pkl"
)
th
.
save
(
model
.
state_dict
(),
f
"
{
args
.
dataname
}
.pkl"
)
...
...
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