📄 gradchek.htm
字号:
<html><head><title>Netlab Reference Manual gradchek</title></head><body><H1> gradchek</H1><h2>Purpose</h2>Checks a user-defined gradient function using finite differences.<p><h2>Synopsis</h2><PRE>gradchek(w, func, grad)[gradient, delta] = gradchek(w, func, grad)gradchek(w, func, grad, p1, p2, ...)</PRE><p><h2>Description</h2>This function is intended as a utility for other netlab functions(particularly optimisation functions) to use. It enables the userto check whether a gradient calculation has been correctly implmentedfor a given function.<CODE>gradchek(w, func, grad)</CODE> checks how accurate the gradient <CODE>grad</CODE> of a function <CODE>func</CODE> is at a parameter vector <CODE>x</CODE>. A centraldifference formula with step size 1.0e-6 is used, and the resultsfor both gradient function and finite difference approximation areprinted.The optional return value <CODE>gradient</CODE> is the gradient calculatedusing the function <CODE>grad</CODE> and the return value <CODE>delta</CODE> is thedifference between the functional and finite difference methods ofcalculating the graident.<p><CODE>gradchek(x, func, grad, p1, p2, ...)</CODE> allows additional argumentsto be passed to <CODE>func</CODE> and <CODE>grad</CODE>.<p><h2>See Also</h2><CODE><a href="conjgrad.htm">conjgrad</a></CODE>, <CODE><a href="graddesc.htm">graddesc</a></CODE>, <CODE><a href="hmc.htm">hmc</a></CODE>, <CODE><a href="olgd.htm">olgd</a></CODE>, <CODE><a href="quasinew.htm">quasinew</a></CODE>, <CODE><a href="scg.htm">scg</a></CODE><hr><b>Pages:</b><a href="index.htm">Index</a><hr><p>Copyright (c) Ian T Nabney (1996-9)</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -