def _hess_j(C_j, I_j, b_j, b_j_norm, a_1_j, a_2_j):
"""Compute the Hessian with respect to one of the coefficients."""
D_j = torch.ger(b_j, b_j)
return C_j + (a_1_j/b_j_norm)*(I_j - D_j/(b_j_norm**2)) + a_2_j*I_j
评论列表
文章目录