(self)
return lipschitz
Return the Lipschitz constant as a Tensor.

        This assumes that only contractive nonlinearities are used! Examples
        are ReLUs and Sigmoids.

        Returns
        -------
        lipschitz : Tensor
            The Lipschitz constant of the neural network.
Return the Lipschitz constant as a Tensor.
Return the Lipschitz constant as a Tensor .
def lipschitz(self):
        """Return the Lipschitz constant as a Tensor.

        This assumes that only contractive nonlinearities are used! Examples
        are ReLUs and Sigmoids.

        Returns
        -------
        lipschitz : Tensor
            The Lipschitz constant of the neural network.

        """
        lipschitz = tf.constant(1, config.dtype)

        for W, b in self._parameter_iter():
            # lipschitz *= tf.reduce_max(tf.svd(W, compute_uv=False))
            lipschitz *= tf.reduce_max(self._svd(W))

        return lipschitz
def lipschitz ( self ) : lipschitz = tf . constant ( 1 , config . dtype ) for W , b in self . _parameter_iter ( ) : # lipschitz *= tf.reduce_max(tf.svd(W, compute_uv=False)) lipschitz *= tf . reduce_max ( self . _svd ( W ) ) return lipschitz