-
Notifications
You must be signed in to change notification settings - Fork 7
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
add convenient functions stack
/unstack
#26
base: master
Are you sure you want to change the base?
Conversation
How does it behave with AD? |
Good question. Without even trying it, I bet it doesn't work here. I was just thinking about the data preparation stage This package is pretty lightweight so I believe @bramtayl won't want to have extra dependencies here to support AD. |
Right, I tend to agree. I know that for LazyArrays, we had to support the |
To be clear, it might still work (LazyArrays did at the time) but the adjoint meant that it remained lazy in the backwards pass as well, so it was needed for efficiency. |
Hi! I'm glad you find the package useful. I'd be very happy to accept a PR for auto-differentiation (although I'm not sure I could understand it enough to review it). I'm not sure I understand why stack/unstack are needed though? |
Also, on the AD part, have you seen this? https://github.com/mcabbott/SliceMap.jl |
Unlike
Align
/Slices
, the input tostack
/unstack
is the outer dimensions. It's possible to support multiple dimensions, but I didn't bother here because my direct target is one-dimensional case.@DhairyaLGandhi this is a direct replacement for
Flux.stack
/Flux.unstack
without allocating memories.