Algorithm 神经网络中计算代价函数hessian的最有效方法

Algorithm 神经网络中计算代价函数hessian的最有效方法,algorithm,neural-network,backpropagation,levenberg-marquardt,hessian-matrix,Algorithm,Neural Network,Backpropagation,Levenberg Marquardt,Hessian Matrix,我正在编写一个MLP网络,我想实现levenberg-marquardt算法。使用levenberg-marquardt,每次迭代后的权重更新由以下公式给出: W(t+1) = W(t) - (H(t)+ l(t)*I)^-1 * J // W(t) is the matrix of weight at instant t // H(t) is the `hessian` of the cost function // l(t) is a learning rate // J is the g

我正在编写一个
MLP
网络,我想实现
levenberg-marquardt
算法。使用
levenberg-marquardt
,每次迭代后的权重更新由以下公式给出:

W(t+1) = W(t) - (H(t)+ l(t)*I)^-1 * J

// W(t) is the matrix of weight at instant t
// H(t) is the `hessian` of the cost function
// l(t) is a learning rate
// J is the gradient of the cost function.

但我找不到一种算法来计算(或对
hessian
进行可接受的估计)。我该怎么做呢?

它不像微积分那样是一种算法。hessian只是二阶导数的一个奇特术语。就像你需要计算基本梯度下降的代价函数的导数一样,你需要计算这个算法的二阶导数。对于神经网络来说,它变得非常丑陋。我可以找到这个-也许你可以找到更多。我知道如何计算最后一层的二阶导数,但是其他层会变得复杂得多。一层的二阶导数可以用下一层的函数表示,但我不知道怎么做。这与grandient的反向传播原理相同,但我想知道如何实现它。ThanksI不认为R中的任何包都有用于训练神经网络的levenberg-marquardt算法。即使是最新的“RSNNS”软件包也只有用于训练的Std反向传播、反向传播和Rprop算法。您将自己编写算法。