-
Notifications
You must be signed in to change notification settings - Fork 120
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
The example to use the constrained function #345
Comments
Hello, what you want to return is the Let me know if you like me to clarify anything further. |
Thanks for your reply. I think I might have formulated the code well. But another question is, when the function is too complex, the gradient is almost can not be obtained. So I use the approximation function (f'(x) = (f(x+eps)-f(x))/eps). After the optimization, I found the gradient is not close to zero. It is really strange. Do you have other ideas to get the gradient easily? |
If you have matlab or a similair toolbox you can use that to return the gradient -- https://www.mathworks.com/help/matlab/ref/gradient.html is just one example. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍 |
I am a beginner in C++, and I am curious about the template of the constrained function. Because the examples only show how to solve the square function, I don't know what should I return in the constrained function. Can anyone provide some examples? Thank you very much.
The text was updated successfully, but these errors were encountered: