parameters: (self, param_name)
return_statement: return True
docstring: Whether to use L2 weight decay for `param_name`.
docstring_summary: Whether to use L2 weight decay for `param_name`.
docstring_tokens: Whether to use L2 weight decay for param_name .
function: def _do_use_weight_decay(self, param_name):
      """Whether to use L2 weight decay for `param_name`."""
      if not self.weight_decay_rate:
        return False
      if self.exclude_from_weight_decay:
        for r in self.exclude_from_weight_decay:
          if re.search(r, param_name) is not None:
            return False
      return True
function_tokens: def _do_use_weight_decay ( self , param_name ) : if not self . weight_decay_rate : return False if self . exclude_from_weight_decay : for r in self . exclude_from_weight_decay : if re . search ( r , param_name ) is not None : return False return True