code: def set_weight_decay(
      model,
      weight_decay,
      skip_list={
          "decoder.attention.v",
          "rnn",
          "lstm",
          "gru",
          "embedding",
      },
  ):
      """
      Skip biases, BatchNorm parameters, rnns.
      and attention projection layer v
      """
      decay = []
      no_decay = []
      for name, param in model.named_parameters():
          if not param.requires_grad:
              continue
  
          if len(param.shape) == 1 or any(
              [skip_name in name for skip_name in skip_list]
          ):
              no_decay.append(param)
          else:
              decay.append(param)
      return [
          {"params": no_decay, "weight_decay": 0.0},
          {"params": decay, "weight_decay": weight_decay},
      ]
  
file_path: TTS/TTS/utils/training.py
imports: import torch
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: set_weight_decay(model, weight_decay, skip_list) and returns: list