(y, y_pred)
return y_pred * (1 - y_pred)
Compute the hessian of softmax cross entropy function

        Parameters
        ----------
        y : int, label

        y_pred : ndarray, the predict probability of each category.

        Returns
        -------
        hessian : ndarray, the hessian of softmax cross entropy loss
Compute the hessian of softmax cross entropy function
Compute the hessian of softmax cross entropy function
def compute_hess(y, y_pred):
        """
        Compute the hessian of softmax cross entropy function

        Parameters
        ----------
        y : int, label

        y_pred : ndarray, the predict probability of each category.

        Returns
        -------
        hessian : ndarray, the hessian of softmax cross entropy loss

        """
        return y_pred * (1 - y_pred)
def compute_hess ( y , y_pred ) : return y_pred * ( 1 - y_pred )