-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GaussNewton params and cost out of sync in state #342
Comments
Hi, thanks for reporting this! That's a very good point. I'd like to avoid computing the residuals again at the end of the function just for the cost. I think |
Yeah, I think that's probably right. In our application re-computing the residuals is quite expensive. Would this require you to make IterState generic over the type of the residuals? |
Sorry that I wasn't able to work on this, I'm swamped with other responsibilities lately.
Yes, probably. Well, at least I think that this would be the approach that would make the most sense. Alternatively one could just say that residuals must be of the same type as the parameter vectors. This will probably work well in most cases but will be a difficult to justify limitation in other cases. |
The code above from gaussnewton_method.rs. Here, residuals are calculated calling apply(params). Those residuals are used to create a new parameter vector. However there is no new set of residuals calculated. So at the end of the function, the new parameter vector and the old residuals (reduced to a cost) are stored in the state. This causes problems for early termination schemes dependent on a correct cost value (like tolerance).
The text was updated successfully, but these errors were encountered: