(self, param_name)
return True
Whether to use L2 weight decay for `param_name`.
Whether to use L2 weight decay for `param_name`.
Whether to use L2 weight decay for param_name .
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
    for r in self.include_in_weight_decay:
      if re.search(r, param_name) is not None:
        return True

    if self.exclude_from_weight_decay:
      for r in self.exclude_from_weight_decay:
        if re.search(r, param_name) is not None:
          tf.logging.info('Adam WD excludes {}'.format(param_name))
          return False
    return True
def _do_use_weight_decay ( self , param_name ) : if not self . weight_decay_rate : return False for r in self . include_in_weight_decay : if re . search ( r , param_name ) is not None : return True if self . exclude_from_weight_decay : for r in self . exclude_from_weight_decay : if re . search ( r , param_name ) is not None : tf . logging . info ( 'Adam WD excludes {}' . format ( param_name ) ) return False return True