(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 _use_weight_decay(self, param_name):
        """Whether to use L2 weight decay for `param_name`."""
        if not self.weight_decay:
            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
def _use_weight_decay ( self , param_name ) : if not self . weight_decay : 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