def l2_norm_sqr(w):
    """
    Returns square of L2 norm of the given matrix (w).
    square of L2 norm of a matrix is simply the sum of square of elements of the matrix.
       
    @input: w, a theano shared variable.
    @output: L2 norm of w
    """

    return (w ** 2).sum()