def l1_norm(w):
    """
    Returns L1 norm of the given matrix (w).
    L1 norm is simply sum of a matrix elements.

    @input: w, a theano shared variable.
    @output: L1 norm of w
    """

    return abs(w).sum()