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
Adjust SPSA Logistic Regression test optimizer parameter #87
Conversation
I found that this helps, but there are still occasional failures. I had better success by running the test three times, like we do for some tests, and then making sure it succeeded at least once. Here's the code I used:
Note that I also found that each run of However, I then dug into the SPSA implementation and found some other issues that I'm happy to fix but I want to get some confirmation on:
That should be the approximation of the gradient. However, we're simply looping
A key point there is that there is no loop over the batch size.
Let me know what you think. Like I said I'm happy to make the changes, but I want to double-check that you agree first. |
Interesting, I Interesting, I tested the optimizer like 500 times with a single error (using a new random seed each time), but if you still see errors I'm fine to run the test multiple times, I guess since you adjusted the number of iterations it's still fast enough. About SPSA/BatchSPSA; I agree, switching to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I observed about the same thing too. It was one error every ~500-800 iterations, but I generally shoot for ~1000 clean iterations with no failures. (Maybe I am too paranoid?) Mostly I found the change I proposed made it run a bunch faster too. Anyway, I'm fine whichever way you want to go with this.
We should definitely switch to |
I'll work up a patch and get it to you shortly, and we can apply all the changes in this PR. 👍 |
Here's a patch: https://gist.github.com/a1deacc1debefbcd90b9d280364469a0 |
Signed-off-by: Marcus Edel <marcus.edel@fu-berlin.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks, I forgot to remove the random seed. Feel free to merge whenever you're ready. 👍
Adjust SPSA Logistic Regression test optimizer parameter.