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

batchseq with vectors of vectors #140

Open
mkschleg opened this issue Jan 30, 2023 · 0 comments
Open

batchseq with vectors of vectors #140

mkschleg opened this issue Jan 30, 2023 · 0 comments

Comments

@mkschleg
Copy link

Just working through my upgrade to Flux v0.13. I'm seeing a difference in batchseq's behavior. Specifically, in the Flux 0.12 batchseq I can do the following:

Flux.batchseq([[rand(3), rand(3), rand(3)], [rand(3), rand(3)]], zeros(3))

Would result in a sequence (of length 3) of matrices of size 3x2 where 3 is num features and 2 is the batch size. Now in MLUtils v0.4.0.

MLUtils.batchseq([[rand(3), rand(3), rand(3)], [rand(3), rand(3)]], zeros(3))

results in a sequence of vector of vectors. The documentation from MLUtils also isn’t helping at all here. Any ideas on how to get the previous behavior? Can’t find anything on the web. I can rewrite the function, but would rather use a more central function that can be tested.

After playing with the function, in this instance obsview in the MLUtils version results in a 0-dim view of the vector of vectors, and so when batching it just concats the vectors instead of stacking them. Once obsview is removed it reverts back to the old behavior. I'm happy to put in a fix, but obsview likely is used to cover another use case that I'm unaware of so am not sure where to focus effort.

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