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
Fairseq
Commits
97a6b139
Commit
97a6b139
authored
Aug 09, 2018
by
Sergey Edunov
Committed by
Myle Ott
Sep 03, 2018
Browse files
Reset gnorm after each epoch
parent
ef43da72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
train.py
train.py
+1
-1
No files found.
train.py
View file @
97a6b139
...
...
@@ -155,7 +155,7 @@ def train(args, trainer, task, epoch_itr):
progress
.
print
(
stats
)
# reset training meters
for
k
in
[
'train_loss'
,
'train_nll_loss'
,
'wps'
,
'ups'
,
'wpb'
,
'bsz'
,
'clip'
]:
for
k
in
[
'train_loss'
,
'train_nll_loss'
,
'wps'
,
'ups'
,
'wpb'
,
'bsz'
,
'clip'
,
'gnorm'
]:
meter
=
trainer
.
get_meter
(
k
)
if
meter
is
not
None
:
meter
.
reset
()
...
...
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