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
56c28099
"src/vscode:/vscode.git/clone" did not exist on "53f498d2a42d6946b16250cbb8d997c67cf89df5"
Commit
56c28099
authored
Nov 01, 2017
by
Myle Ott
Browse files
Use `--lrshrink` as the reduction factor in ReduceLROnPlateau
parent
e21901e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
fairseq/multiprocessing_trainer.py
fairseq/multiprocessing_trainer.py
+3
-2
No files found.
fairseq/multiprocessing_trainer.py
View file @
56c28099
...
@@ -104,8 +104,9 @@ class MultiprocessingTrainer(MultiprocessingEventLoop):
...
@@ -104,8 +104,9 @@ class MultiprocessingTrainer(MultiprocessingEventLoop):
lr_scheduler
=
LambdaLR
(
self
.
optimizer
,
anneal
)
lr_scheduler
=
LambdaLR
(
self
.
optimizer
,
anneal
)
lr_scheduler
.
best
=
None
lr_scheduler
.
best
=
None
else
:
else
:
# decay the LR by 0.1 every time the validation loss plateaus
# decay the LR by a factor every time the validation loss plateaus
lr_scheduler
=
ReduceLROnPlateau
(
self
.
optimizer
,
patience
=
0
)
lr_scheduler
=
ReduceLROnPlateau
(
self
.
optimizer
,
patience
=
0
,
factor
=
self
.
args
.
lrshrink
)
return
lr_scheduler
return
lr_scheduler
def
get_model
(
self
):
def
get_model
(
self
):
...
...
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