Skip to content
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

Optimizing scalars #92

Open
samanklesaria opened this issue Jun 28, 2022 · 1 comment
Open

Optimizing scalars #92

samanklesaria opened this issue Jun 28, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@samanklesaria
Copy link

It seems like Optimisers only works with vectors.

struct WithFloat
    val :: Float64
end
@functor WithFloat

The call to Optimisers.trainable(WithFloat(4)) returns (val = 4.3,), but destructure(WithFloat(4)) produces an empty vector.

Would you accept a pull request allowing destructure to handle scalar parameters?

@ToucheSir
Copy link
Member

It's not so straightforward, unfortunately. See FluxML/Flux.jl#1991 (comment) and #33.

@mcabbott mcabbott added the enhancement New feature or request label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants