texar-pytorch
texar-pytorch copied to clipboard
Add hidden state in decoder return values
As pointed out in #110, it would be useful to record hidden states in return values.
A problem with the current interface is we only have type annotation for State
, which might include internal variables (e.g. TransformerDecoder
uses Cache
as State
, which includes per-layer memories). We might as well refactor the decoder interfaces.