Gradients of the adjoint code are available in a callback call, it would be interesting to tests these are correct.