cuqi.model.PDEModel.gradient#

PDEModel.gradient(direction, wrt, is_direction_par=True, is_wrt_par=True)#

Gradient of the forward operator (Direction-Jacobian product)

For non-linear models the gradient is computed using the forward operator and the Jacobian of the forward operator.

Parameters:
  • direction (ndarray) – The direction to compute the gradient. The Jacobian is applied to this direction.

  • wrt (ndarray) – The point to compute the Jacobian at. This is only used for non-linear models.

  • is_direction_par (bool) – If True, direction is assumed to be parameters. If False, direction is assumed to be function values.

  • is_wrt_par (bool) – If True, wrt is assumed to be parameters. If False, wrt is assumed to be function values.