parameters: (self, weight_decay, regex=r".*(kernel|weight):0$")
return_statement: return weight_decay * tf.add_n(
              [
                  tf.nn.l2_loss(v)
                  for v in self.trainable_variables
                  if var_match.match(v.name)
              ]
          )
docstring: Return regularization l2 loss loss.
docstring_summary: Return regularization l2 loss loss.
docstring_tokens: Return regularization l2 loss loss .
function: def _reg_l2_loss(self, weight_decay, regex=r".*(kernel|weight):0$"):
          """Return regularization l2 loss loss."""
          var_match = re.compile(regex)
          return weight_decay * tf.add_n(
              [
                  tf.nn.l2_loss(v)
                  for v in self.trainable_variables
                  if var_match.match(v.name)
              ]
          )
function_tokens: def _reg_l2_loss ( self , weight_decay , regex = r".*(kernel|weight):0$" ) : var_match = re . compile ( regex ) return weight_decay * tf . add_n ( [ tf . nn . l2_loss ( v ) for v in self . trainable_variables if var_match . match ( v . name ) ] )