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

fix Stacked to work with Zygote #315

Merged
merged 4 commits into from
Jun 13, 2024
Merged

fix Stacked to work with Zygote #315

merged 4 commits into from
Jun 13, 2024

Conversation

Red-Portal
Copy link
Member

This fixes #252 and also the corresponding issue downstream.

I checked that the performance (both AD and forward) is pretty much the same (slightly better in my setup) as the previous implementation. Interestingly, doing mapreduce(f, vcat) on ys performed consistently worse than doing map+reduce(vcat) and also the previous implementation.

@Red-Portal Red-Portal requested a review from torfjelde June 5, 2024 21:38
src/bijectors/stacked.jl Outdated Show resolved Hide resolved
@Red-Portal Red-Portal requested a review from torfjelde June 6, 2024 23:11
Copy link
Member

@torfjelde torfjelde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff:) LGTM once the formatting has been fixed

@yebai yebai merged commit 9115f1c into TuringLang:master Jun 13, 2024
22 checks passed
@yebai
Copy link
Member

yebai commented Jun 13, 2024

Thanks @Red-Portal!

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

Successfully merging this pull request may close these issues.

Zygote is broken for Stacked bijectors
3 participants