|
|
|
Next: 5.4.1 Code description
Up: 5. Automatic Differentiation
Previous: 5.3.3 Compiling the model
Contents
5.4 The gradient check package
An indispensable test to validate the gradient computed
via the adjoint is a comparison against finite difference
gradients.
The gradient check package pkg/grdchk enables such tests
in a straightforward and easy manner.
The driver routine grdchk_main is called from
the_model_main after the gradient has been computed
via the adjoint model (cf. flow chart ???).
The gradient check proceeds as follows:
The th component of the gradient
is compared with the following finite-difference gradient:
vs.
A gradient check at point may generally considered to be successful
if the deviation of the ratio between the adjoint and the
finite difference gradient from unity is less than 1 percent,
Subsections
mitgcm-support@dev.mitgcm.org
Copyright © 2002
Massachusetts Institute of Technology |
|
|