Gradient: thought comparison of the codegen version and the symbolic version.
This is something I don't understand. There are two ways of obtaining the gradient of a function: (1) codegen uses auto-differentiation; (2) derive the partial derivative symbolically. Both can be translated into C or Fortran code, since my end goal is the C or Fortran code.
The documentation claims the auto-differentiation is more efficient. I don't understand. Any more complete views about this matter? Does auto-differentiation win both in accuracy and efficiency? Or perhaps there is a trade-off between efficiency and accuracy? I just wanted to hear more opinions from your experience. Thanks a lot!