def obfn_reg(self):
        """Compute regularisation term and contribution to objective
        function.
        """

        rl1 = np.linalg.norm((self.Wl1 * self.obfn_g1var()).ravel(), 1)
        rtv = np.sum(np.sqrt(np.sum(self.obfn_g0var()**2, axis=-1)))
        return (self.lmbda*rl1 + self.mu*rtv, rl1, rtv)
def obfn_reg ( self ) : rl1 = np . linalg . norm ( ( self . Wl1 * self . obfn_g1var ( ) ) . ravel ( ) , 1 ) rtv = np . sum ( np . sqrt ( np . sum ( self . obfn_g0var ( ) ** 2 , axis = - 1 ) ) ) return ( self . lmbda * rl1 + self . mu * rtv , rl1 , rtv )
Compute regularisation term and contribution to objective
        function.