rfho/utils.py
def norm(v, name='norm'):
    """
    The the norm of a Tensor: if v is a vector then the norm is the Euclid's norm L2, otherwise it computes the
    Frobenius norm.

    :param name: (optional, default norm) name of the name_scope
    :param v: tf.Tensor or Variable
    :return: a tensor that computes the norm
    """
    with tf.name_scope(name):
        return wsr(tf.sqrt(tf.reduce_sum(tf.square(v))))

    The the norm of a Tensor: if v is a vector then the norm is the Euclid's norm L2, otherwise it computes the
    Frobenius norm.

    :param name: (optional, default norm) name of the name_scope
    :param v: tf.Tensor or Variable
    :return: a tensor that computes the norm
    
The the norm of a Tensor: if v is a vector then the norm is the Euclid's norm L2, otherwise it computes the
Frobenius norm.
The the norm of a Tensor : if v is a vector then the norm is the Euclid ' s norm L2 otherwise it computes the Frobenius norm .
def norm(v, name='norm'):
    with tf.name_scope(name):
        return wsr(tf.sqrt(tf.reduce_sum(tf.square(v))))
def norm ( v , name = 'norm' ) : with tf . name_scope ( name ) : return wsr ( tf . sqrt ( tf . reduce_sum ( tf . square ( v ) ) ) )
The the norm of a Tensor: if v is a vector then the norm is the Euclid's norm L2, otherwise it computes the
Frobenius norm.
The the norm of a Tensor : if v is a vector then the norm is the Euclid ' s norm L2 otherwise it computes the Frobenius norm .
"""
    The the norm of a Tensor: if v is a vector then the norm is the Euclid's norm L2, otherwise it computes the
    Frobenius norm.

    :param name: (optional, default norm) name of the name_scope
    :param v: tf.Tensor or Variable
    :return: a tensor that computes the norm
    """
a tensor that computes the norm
a tensor that computes the norm
v
tf.Tensor or Variable
tf . Tensor or Variable
name
(optional, default norm) name of the name_scope
( optional default norm ) name of the name_scope