-
Notifications
You must be signed in to change notification settings - Fork 2
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
Why is ndeps
forced to be static?
#42
Comments
Mainly because the solver doesn't currently support the ability to change the number of dependent blocks during an optimization. But you're right. Nothing actually depends on the output of |
Just to clarify, I'm not talking about changing the number of dependencies during runtime. My concern is that interaction between For example for an SfM problem one may want to have a |
I see. Makes sense. Have you tried just removing the check? It should still work, but I think performance would go down for residuals where the value isn't static; I would expect some type instability and allocations. I would consider accepting a PR if you test it out on your application and find it useful. With the SfM application you mention, is there a reason you can't use a separate residual block per image? Are the residuals interdependent? |
addcost!
forcesndeps
to return a static value. However I don't see why this is. It doesn't look like the fact that it is static is used anywhere.costdeps
(https://github.com/ojwoodford/NLLSsolver.jl/blame/4a372d66dfa021544e9a0b441e19b9c9669c4422/src/problem.jl#L192) seems to allow dynamic values.The text was updated successfully, but these errors were encountered: