[Enhance] support to add custom settings to param_group (#283)
parent
a9afdad7a8
commit
8b3675a2aa
|
@ -216,6 +216,9 @@ class DefaultOptimWrapperConstructor:
|
||||||
if self.base_wd is not None:
|
if self.base_wd is not None:
|
||||||
decay_mult = custom_keys[key].get('decay_mult', 1.)
|
decay_mult = custom_keys[key].get('decay_mult', 1.)
|
||||||
param_group['weight_decay'] = self.base_wd * decay_mult
|
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
|
break
|
||||||
|
|
||||||
if not is_custom:
|
if not is_custom:
|
||||||
|
|
Loading…
Reference in New Issue