'Returns the Smooth-L1 cost'

def smoothL1(self, x):

    return ((((0.5 * self.be.square(x)) * self._sigma2) * (self.be.absolute(x) < (1 / self._sigma2))) + ((self.be.absolute(x) - (0.5 / self._sigma2)) * (self.be.absolute(x) >= (1 / self._sigma2))))
