'L2 weight decay loss.'

def _decay(self):

    costs = []
    for var in tf.trainable_variables():
        if (var.op.name.find('DW') > 0):
            costs.append(tf.nn.l2_loss(var))
    return tf.multiply(self.hps.weight_decay_rate, tf.add_n(costs))
