FluxML / Optimisers.jl

Optimisers.jl defines many standard optimisers and utilities for learning loops.
https://fluxml.ai/Optimisers.jl
MIT License
72 stars 20 forks source link

add trainables_with_path #173

Closed CarloLucibello closed 5 months ago

CarloLucibello commented 5 months ago

continuation of #171, to be merged after that.

CarloLucibello commented 5 months ago

In https://github.com/FluxML/Optimisers.jl/pull/171#issuecomment-2037210879 @darsnack said

Also, while okay for Functors, I'm not a fan of duplicated *_with_path functions. Like @ToucheSir suggested, if we want two variants, then a keyword flag seems like a better API.

If we are not concerned with type instability and performance issues I agree that a flag would be better.

ToucheSir commented 5 months ago

I think the implementation is already type unstable, so I wouldn't be concerned. Making a method with kwargs type stable would be easy compared to making all of the internals type stable, even under AD.

CarloLucibello commented 5 months ago

I don't understand how to switch this PR to target master, I'll open a new one