diff --git a/ppdet/optimizer/optimizer.py b/ppdet/optimizer/optimizer.py index e6d5fe44ae2ccbf9f852d00a812ba4f6e98465e0..e8a0dd8c880699044a7af52a314b33bff27c683c 100644 --- a/ppdet/optimizer/optimizer.py +++ b/ppdet/optimizer/optimizer.py @@ -342,7 +342,7 @@ class OptimizerBuilder(): n: p for n, p in model.named_parameters() if any([k in n - for k in group['params']] and p.trainable is True) + for k in group['params']]) and p.trainable is True } _group = group.copy() _group.update({'params': list(_params.values())})