google / jaxopt

Hardware accelerated, batchable and differentiable optimizers in JAX.
https://jaxopt.github.io
Apache License 2.0
936 stars 66 forks source link

Add usage examples for the documentations #499

Open amir-saadat opened 1 year ago

amir-saadat commented 1 year ago

This may be a duplicate. It would be very useful if we add example usage together with the docstrings and/or the documentation.

fabianp commented 1 year ago

hey @amir-saadat , could you elaborate a bit more on where do you think examples should be added or linked?

amir-saadat commented 1 year ago

hey @fabianp thanks for looking into this. a couple of suggestions:

fabianp commented 1 year ago

thanks for the clarification. I agree that both of these points would be nice improvements.

For the first point, for example in the stochastic optimization page , I don't think the examples should be at the top of the page, but rather inside each section, so that you can easily see which solvers use (say) the OptaxSolver or the ArmijoSGD. I think we're saying the same thing, just wanted to state a specific example :-)

fabianp commented 1 year ago

@amir-saadat : would you be willing to submit a pull request implementing (some of) this?