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

Gradients for generators #3

Open
mcabbott opened this issue Oct 31, 2019 · 0 comments
Open

Gradients for generators #3

mcabbott opened this issue Oct 31, 2019 · 0 comments

Comments

@mcabbott
Copy link
Owner

Despite claiming to work with Zygote, generators currently don’t work:

julia> using Zygote, LazyStack

julia> gradient(x -> sum(stack([x,x'])), rand(2,2)) # vector of arrays
([2.0 2.0; 2.0 2.0],)

julia> gradient(x -> sum(stack(x,x')), rand(2,2)) # tuple of arrays
([2.0 2.0; 2.0 2.0],)

julia> gradient(x -> sum(stack(x' for x in [x,x])), rand(2,2)) # generator
ERROR: not yet!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant