code: def add_weight_decay_filter_fc(
      model,
      learning_rate=0.001,
      weight_decay=1e-5,
      skip_list=(),
      fc_names=_TIMM_FC_NAMES,
      feature_lr_mult=0.01,
      fc_lr_mult=1,
  ):
      if feature_lr_mult == 1 and fc_lr_mult == 1:
          return add_weight_decay(model, weight_decay, skip_list)
      decay_feat = []
      no_decay_feat = []
      decay_fc = []
      no_decay_fc = []
      for name, param in model.named_parameters():
          is_fc = False
          if any([name.startswith(pattern) for pattern in fc_names]):
              is_fc = True
          if not param.requires_grad:
              continue  # frozen weights
          if (
              len(param.shape) == 1
              or name.endswith(".bias")
              or name in skip_list
          ):
              if is_fc:
                  no_decay_fc.append(param)
              else:
                  no_decay_feat.append(param)
          else:
              if is_fc:
                  decay_fc.append(param)
              else:
                  decay_feat.append(param)
      return [
          {
              "params": no_decay_feat,
              "weight_decay": 0.0,
              "lr": feature_lr_mult * learning_rate,
          },
          {
              "params": no_decay_fc,
              "weight_decay": 0.0,
              "lr": fc_lr_mult * learning_rate,
          },
          {
              "params": decay_feat,
              "weight_decay": weight_decay,
              "lr": feature_lr_mult * learning_rate,
          },
          {
              "params": decay_fc,
              "weight_decay": weight_decay,
              "lr": fc_lr_mult * learning_rate,
          },
      ]
  
imports: from timm.optim.optim_factory import *
label_desc: Use image node_id 2 for calling a global function with example usage: add_weight_decay_filter_fc(model, learning_rate, weight_decay, skip_list, fc_names, feature_lr_mult, fc_lr_mult) and returns: list, add_weight_decay