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

Allow stateful modules in the graph executor #9

Closed
Jegp opened this issue Oct 2, 2023 · 0 comments · Fixed by #13
Closed

Allow stateful modules in the graph executor #9

Jegp opened this issue Oct 2, 2023 · 0 comments · Fixed by #13

Comments

@Jegp
Copy link
Collaborator

Jegp commented Oct 2, 2023

The graph executor currently doesn't allow modules to have state. If we have a tensor where the outer dimension is time, then we are forced to run all the frames through each node, like so:

tensor = ... # Time x Batch x ...
module(tensor)

We might want to support iterative application, which is for instance necessary for real-time modules:

tensor = ... # Time x Batch x ...
state = None
for frame in tensor:
  out, new_state = module(frame)

This is the (functional) model Norse is following, so we would have to make sure this also works for libraries with mutable state (where the state variable is not explicitly passed).

@Jegp Jegp linked a pull request Oct 21, 2023 that will close this issue
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 a pull request may close this issue.

1 participant