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

Support for MultiRNNCell #472

Closed
mchitre opened this issue Dec 27, 2023 · 5 comments · Fixed by #521
Closed

Support for MultiRNNCell #472

mchitre opened this issue Dec 27, 2023 · 5 comments · Fixed by #521
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@mchitre
Copy link

mchitre commented Dec 27, 2023

It would be nice to have the equivalent of MultiRNNCell in Lux

@avik-pal avik-pal added enhancement New feature or request good first issue Good for newcomers labels Dec 27, 2023
@avik-pal
Copy link
Member

I will take a closer look at this, but I think we can just use Chain. If we can use a chain, we should just add a note in the manual

@mchitre
Copy link
Author

mchitre commented Dec 28, 2023

Chains of this type work:

Chain(
  Recurrence(RNNCell(inputsize => latentsize); return_sequence=true),
  x -> stack(x; dims=2),
  Recurrence(RNNCell(latentsize => latentsize); return_sequence=true),
  x -> stack(x; dims=2)
      :
)

@avik-pal
Copy link
Member

You might not need a stack here I think. Recurrence should be able to take a VectorOfArray input (this was one of the reasons to not stack the outputs by default)

@mchitre
Copy link
Author

mchitre commented Dec 28, 2023

Yes, I just tested that. I only need the stack at the end to allow a Dense layer to take in the output. So:

Chain(
  Recurrence(RNNCell(inputsize => latentsize); return_sequence=true),
  Recurrence(RNNCell(latentsize => latentsize); return_sequence=true),
      :
  x -> stack(x; dims=2)
)

works.

@mchitre
Copy link
Author

mchitre commented Dec 28, 2023

So just a note in the documentation is good enough for this.

@avik-pal avik-pal added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants