def L2_regularization(params, L2_rate=0.):
    """L2 Regularization
    
    Parameters
    ----------
    params : tuple
        list of params
    L2_rate : double
        decay rate of L2 regularization
        
    Returns
    -------
    cost : scalar
        L2 regularization decay
    """
    
    cost=0;
    for param in params:
        cost+=(param**2).sum();
    
    return L2_rate*cost;