| 203 | """ |
| 204 | |
| 205 | def __init__(self, trainable=True, name=None, dtype=None, **kwargs): |
| 206 | super(RNNCell, self).__init__( |
| 207 | trainable=trainable, name=name, dtype=dtype, **kwargs) |
| 208 | # Attribute that indicates whether the cell is a TF RNN cell, due the slight |
| 209 | # difference between TF and Keras RNN cell. Notably the state is not wrapped |
| 210 | # in a list for TF cell where they are single tensor state, whereas keras |
| 211 | # cell will wrap the state into a list, and call() will have to unwrap them. |
| 212 | self._is_tf_rnn_cell = True |
| 213 | |
| 214 | def __call__(self, inputs, state, scope=None): |
| 215 | """Run this RNN cell on inputs, starting from the given state. |