(self, sigma=1.0)
Define the cost function and its gradient as lambda functions.
Define the cost function and its gradient as lambda functions.
Define the cost function and its gradient as lambda functions .
def __init__(self, sigma=1.0):
        """
        Define the cost function and its gradient as lambda functions.
        """
        self.sigma = sigma
        self._sigma2 = self.be.square(sigma)
        self.func = lambda y, t: self.be.sum(self.smoothL1(y - t), axis=0)
        self.funcgrad = lambda y, t: self.smoothL1grad(y - t)
def __init__ ( self , sigma = 1.0 ) : self . sigma = sigma self . _sigma2 = self . be . square ( sigma ) self . func = lambda y , t : self . be . sum ( self . smoothL1 ( y - t ) , axis = 0 ) self . funcgrad = lambda y , t : self . smoothL1grad ( y - t )