Skip to content
Snippets Groups Projects
Commit 028cfe61 authored by Zhengxiao Du's avatar Zhengxiao Du
Browse files

Fix get_params_for_weight_decay_optimization

parent 69cbe5dd
No related branches found
No related tags found
No related merge requests found
......@@ -204,9 +204,9 @@ def get_params_for_weight_decay_optimization(module):
if p is not None and n == 'bias' and p.requires_grad])
if len(weight_decay_params['params']) == 0:
return tuple(no_weight_decay_params)
return (no_weight_decay_params,)
elif len(no_weight_decay_params['params']) == 0:
return tuple(weight_decay_params)
return (weight_decay_params,)
return weight_decay_params, no_weight_decay_params
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment