Open odashi opened 7 years ago
I think this is a documentation problem. The actual semantics of get_s
and set_s
are "set all of the information that the RNN needs." In the case of RNNs and GRUs, this is just h
. In the case of LSTMs, this is h
and c
. The documentation is saying something different though, so we should fix this.
We could add set_c
and get_c
methods to lstms. Would be a bit rebarbative to code but it's mostly copy pasting of set_h/get_h
. Would also need subclass specific bindings in python
In some state-less
RNNBuilder
implementations (e.g.SimpleRNNBuilder
orGRUBuilder
) also haveget_s/set_s_impl
overridings, and they are basically coded as the redirect toget_h/set_h_impl
. This (especially the setter) brings a side-effect against h-units, and maybe it sometimes could be an undesirable behavior.I guess it is better that the
get_s
returns 0 andset_s_impl
behaves no action if the RNN cell does not have s-units. How do maintainers think?