mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
fix layer key name for dynamic lr in adamwdl optimizer
This commit is contained in:
parent
80ae9079cd
commit
042d1e7ef8
@ -411,7 +411,10 @@ class AdamWDL(object):
|
||||
idx = static_name.find("blocks.")
|
||||
layer = int(static_name[idx:].split(".")[1])
|
||||
ratio = decay_rate**(n_layers - layer)
|
||||
elif "embed" in static_name:
|
||||
elif any([
|
||||
key in static_name
|
||||
for key in ["embed", "token", "conv1", "ln_pre"]
|
||||
]):
|
||||
ratio = decay_rate**(n_layers + 1)
|
||||
# param.optimize_attr["learning_rate"] *= ratio
|
||||
return ratio
|
||||
|
Loading…
x
Reference in New Issue
Block a user