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
c9b800d2
Commit
c9b800d2
authored
Aug 24, 2018
by
Sergey Edunov
Committed by
Myle Ott
Sep 03, 2018
Browse files
Old checkpoints can't be loaded because of a new meter
parent
9c102784
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
fairseq/trainer.py
fairseq/trainer.py
+1
-1
No files found.
fairseq/trainer.py
View file @
c9b800d2
...
@@ -107,7 +107,7 @@ class Trainer(object):
...
@@ -107,7 +107,7 @@ class Trainer(object):
self
.
_num_updates
=
last_optim
[
'num_updates'
]
self
.
_num_updates
=
last_optim
[
'num_updates'
]
if
extra_state
is
not
None
and
'train_meters'
in
extra_state
:
if
extra_state
is
not
None
and
'train_meters'
in
extra_state
:
self
.
meters
=
extra_state
[
'train_meters'
]
self
.
meters
.
update
(
extra_state
[
'train_meters'
]
)
del
extra_state
[
'train_meters'
]
del
extra_state
[
'train_meters'
]
# reset TimeMeters, since their start times don't make sense anymore
# reset TimeMeters, since their start times don't make sense anymore
...
...
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