We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following MWE fails for Bijectors Bijectors v0.15.3
#]activate --temp #add Bijectors, Zygote using Bijectors using Zygote x = [-2, 3.0, 2.1, 2.2] ranges = [1:1, 2:2, 3:4] tr = Stacked((elementwise(identity), elementwise(exp), elementwise(exp)), ranges) y = tr(x) gr = Zygote.gradient(tr, x) # error: output length mismatch (4 != 3)
Environment
julia> Pkg.status() Status `/tmp/jl_fDy5Lg/Project.toml` [76274a88] Bijectors v0.15.3 [e88e6eb3] Zygote v0.7.1
The text was updated successfully, but these errors were encountered:
This should be fixed by #362 once it's merged. Thanks for spotting and reporting @bgctw!
Note that since tr in your example returns a vector, you need to call Zygote.jacobian rather than Zygote.gradient. With #362 this works:
tr
Zygote.jacobian
Zygote.gradient
julia> using Bijectors using Zygote x = [-2, 3.0, 2.1, 2.2] ranges = [1:1, 2:2, 3:4] tr = Stacked((elementwise(identity), elementwise(exp), elementwise(exp)), ranges) y = tr(x) Zygote.jacobian(tr, x) ([1.0 0.0 0.0 0.0; 0.0 20.085536923187668 0.0 0.0; 0.0 0.0 8.16616991256765 0.0; 0.0 0.0 0.0 9.025013499434122],)
Sorry, something went wrong.
Bijectors v0.15.4 should be out later today, and includes the fix for this.
Thanks for this quick fix and the quick release of it.
mhauru
Successfully merging a pull request may close this issue.
The following MWE fails for Bijectors Bijectors v0.15.3
Environment
The text was updated successfully, but these errors were encountered: