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
d1247b6f
Unverified
Commit
d1247b6f
authored
Jun 06, 2023
by
Andrei Ivanov
Committed by
GitHub
Jun 07, 2023
Browse files
[Misc]Improving the output of the DCRNN training script. (#5790)
Co-authored-by:
Mufei Li
<
mufeili1996@gmail.com
>
parent
23772ee1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/pytorch/dtgrnn/train.py
examples/pytorch/dtgrnn/train.py
+2
-2
No files found.
examples/pytorch/dtgrnn/train.py
View file @
d1247b6f
...
@@ -87,7 +87,7 @@ def train(
...
@@ -87,7 +87,7 @@ def train(
scheduler
.
step
()
scheduler
.
step
()
total_loss
.
append
(
float
(
loss
))
total_loss
.
append
(
float
(
loss
))
batch_cnt
[
0
]
+=
1
batch_cnt
[
0
]
+=
1
print
(
"Batch: "
,
i
)
print
(
"
\r
Batch: "
,
i
,
end
=
""
)
return
np
.
mean
(
total_loss
)
return
np
.
mean
(
total_loss
)
...
@@ -284,7 +284,7 @@ if __name__ == "__main__":
...
@@ -284,7 +284,7 @@ if __name__ == "__main__":
dcrnn
,
g
,
test_loader
,
normalizer
,
loss_fn
,
device
,
args
dcrnn
,
g
,
test_loader
,
normalizer
,
loss_fn
,
device
,
args
)
)
print
(
print
(
"Epoch: {} Train Loss: {} Valid Loss: {} Test Loss: {}"
.
format
(
"
\r
Epoch: {} Train Loss: {} Valid Loss: {} Test Loss: {}"
.
format
(
e
,
train_loss
,
valid_loss
,
test_loss
e
,
train_loss
,
valid_loss
,
test_loss
)
)
)
)
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