mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
[Enhance] support to add custom settings to param_group (#283)
This commit is contained in:
parent
a9afdad7a8
commit
8b3675a2aa
@ -216,6 +216,9 @@ class DefaultOptimWrapperConstructor:
|
||||
if self.base_wd is not None:
|
||||
decay_mult = custom_keys[key].get('decay_mult', 1.)
|
||||
param_group['weight_decay'] = self.base_wd * decay_mult
|
||||
# add custom settings to param_group
|
||||
for k, v in custom_keys[key].items():
|
||||
param_group[k] = v
|
||||
break
|
||||
|
||||
if not is_custom:
|
||||
|
Loading…
x
Reference in New Issue
Block a user