-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Milestone
Description
As it was discussed in #16, RETURNN layers with (hidden) state (e.g. RecLayer with unit="lstm") should make the state explicit in the API. E.g. the Rec module should get two arguments input and prev_state and return output and state. So the usage would look like this in a loop:
lstm = Lstm(...)
with Loop() as loop:
...
out, loop.state.lstm = lstm(x, loop.state.lstm)
Or like this outside a loop (using default initial state, ignoring last state):
lstm = Lstm(...)
out, _ = lstm(x)
This applies for all RETURNN layers with rec hidden state, and further modules like Lstm.
See RETURNN layers with rec hidden state.
Relevant modules here:
_Recbased, e.g.Lstm(only one so far)windowcumsumken_lm_stateedit_distance_tableunmask_TwoDLSTMcum_concat
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels