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).
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:
We might want to support iterative application, which is for instance necessary for real-time modules:
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).