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
e9967cd3
Commit
e9967cd3
authored
Jun 21, 2018
by
Myle Ott
Browse files
Fix interpretation of --max-epoch
parent
678d0bbc
Changes
1
Show 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 @
e9967cd3
...
@@ -82,7 +82,7 @@ def main(args):
...
@@ -82,7 +82,7 @@ def main(args):
train_meter
.
start
()
train_meter
.
start
()
valid_losses
=
[
None
]
valid_losses
=
[
None
]
valid_subsets
=
args
.
valid_subset
.
split
(
','
)
valid_subsets
=
args
.
valid_subset
.
split
(
','
)
while
lr
>
args
.
min_lr
and
epoch_itr
.
epoch
<
=
max_epoch
and
trainer
.
get_num_updates
()
<
max_update
:
while
lr
>
args
.
min_lr
and
epoch_itr
.
epoch
<
max_epoch
and
trainer
.
get_num_updates
()
<
max_update
:
# train for one epoch
# train for one epoch
train
(
args
,
trainer
,
task
,
epoch_itr
)
train
(
args
,
trainer
,
task
,
epoch_itr
)
...
...
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