-
Notifications
You must be signed in to change notification settings - Fork 15
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
First step of GradientDescent
optimizer is a no-op
#82
Comments
This is expected... but admittedly maybe not great design. The relevant code is here: optimistix/optimistix/_solver/gradient_methods.py Lines 156 to 214 in 58348db
The way this works is that we actually treat general gradient methods, which typically start by picking a descent direction, and then performing a line search in that direction. Once the line search has found an acceptable point to stop, then this location is used to start a new line search. In the case of Off the top of my head I'm not sure how we'd change this. We might be able to tweak the logic in the above block of code to remove this off-by-one approach to things. (I'm open to suggestions on this one.) |
It seems like the first call to
step
of theGradientDescent
optimizer doesn't perform the step operation. I didn't check if this occurs for other optimizers or do other digging, but can do so if this is not expected behavior and the cause is not immediate. Here is a MWE:Running with
GradientDescent
gives:cf.
OptaxMinimiser(optax.sgd(...), ...)
:The text was updated successfully, but these errors were encountered: