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
wangsen
paddle_dbnet
Commits
592bd60f
"...git@developer.sourcefind.cn:chenpangpang/diffusers.git" did not exist on "59f0ce82eb5c7684e3cfd294005a91c56a429acd"
Commit
592bd60f
authored
Nov 06, 2020
by
WenmuZhou
Browse files
switch learning_rate and lr
parent
d9e921c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
ppocr/optimizer/__init__.py
ppocr/optimizer/__init__.py
+2
-3
No files found.
ppocr/optimizer/__init__.py
View file @
592bd60f
...
@@ -29,7 +29,7 @@ def build_lr_scheduler(lr_config, epochs, step_each_epoch):
...
@@ -29,7 +29,7 @@ def build_lr_scheduler(lr_config, epochs, step_each_epoch):
lr_name
=
lr_config
.
pop
(
'name'
)
lr_name
=
lr_config
.
pop
(
'name'
)
lr
=
getattr
(
learning_rate
,
lr_name
)(
**
lr_config
)()
lr
=
getattr
(
learning_rate
,
lr_name
)(
**
lr_config
)()
else
:
else
:
lr
=
lr_config
[
'l
r
'
]
lr
=
lr_config
[
'l
earning_rate
'
]
return
lr
return
lr
...
@@ -37,8 +37,7 @@ def build_optimizer(config, epochs, step_each_epoch, parameters):
...
@@ -37,8 +37,7 @@ def build_optimizer(config, epochs, step_each_epoch, parameters):
from
.
import
regularizer
,
optimizer
from
.
import
regularizer
,
optimizer
config
=
copy
.
deepcopy
(
config
)
config
=
copy
.
deepcopy
(
config
)
# step1 build lr
# step1 build lr
lr
=
build_lr_scheduler
(
lr
=
build_lr_scheduler
(
config
.
pop
(
'lr'
),
epochs
,
step_each_epoch
)
config
.
pop
(
'learning_rate'
),
epochs
,
step_each_epoch
)
# step2 build regularization
# step2 build regularization
if
'regularizer'
in
config
and
config
[
'regularizer'
]
is
not
None
:
if
'regularizer'
in
config
and
config
[
'regularizer'
]
is
not
None
:
...
...
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