docstr: Exclude variables from weight decay.
  
  This method must be called before the optimizer's `build` method is
  called. You can set specific variables to exclude out, or set a list of
  strings as the anchor words, if any of which appear in a variable's
  name, then the variable is excluded.
  
  Args:
      var_list: A list of `tf.Variable`s to exclude from weight decay.
      var_names: A list of strings. If any string in `var_names` appear
          in the model variable's name, then this model variable is
          excluded from weight decay. For example, `var_names=['bias']`
          excludes all bias variables from weight decay.
docstr_tok: ["Exclude","variables","from","weight","decay",".","This","method","must","be","called","before","the","optimizer","'s","`","build","`","method","is","called",".","You","can","set","specific","variables","to","exclude","out",",","or","set","a","list","of","strings","as","the","anchor","words",",","if","any","of","which","appear","in","a","variable's","name",",","then","the","variable","is","excluded",".","Args",":","var_list",":","A","list","of","`","tf.Variable","`","s","to","exclude","from","weight","decay",".","var_names",":","A","list","of","strings",".","If","any","string","in","`","var_names","`","appear","in","the","model","variable","'s","name",",","then","this","model","variable","is","excluded","from","weight","decay",".","For","example",",","`","var_names=","[","'bias","'","]","`","excludes","all","bias","variables","from","weight","decay","."]
code: def exclude_from_weight_decay(self, var_list=None, var_names=None):
      """Exclude variables from weight decay.
  
      This method must be called before the optimizer's `build` method is
      called. You can set specific variables to exclude out, or set a list of
      strings as the anchor words, if any of which appear in a variable's
      name, then the variable is excluded.
  
      Args:
          var_list: A list of `tf.Variable`s to exclude from weight decay.
          var_names: A list of strings. If any string in `var_names` appear
              in the model variable's name, then this model variable is
              excluded from weight decay. For example, `var_names=['bias']`
              excludes all bias variables from weight decay.
      """
      if hasattr(self, "_built") and self._built:
          raise ValueError(
              "`exclude_from_weight_decay()` can only be configued before "
              "the optimizer is built."
          )
  
      if var_list:
          self._exclude_from_weight_decay = [
              self._var_key(variable) for variable in var_list
          ]
      else:
          self._exclude_from_weight_decay = []
      self._exclude_from_weight_decay_names = var_names or []
  
imports: import re
  import warnings
  import numpy
  from keras import backend
  from keras import initializers
  from keras import ops
  from keras.optimizers.schedules import learning_rate_schedule
  from keras.saving import serialization_lib
  from keras.utils import tracking
  from keras.utils.naming import auto_name
label_desc: Use image node_id 30 for calling the BaseOptimizer obj's underlying member method code with example usage: obj.exclude_from_weight_decay(var_list, var_names) without return types