| 716 | raise ValueError('RNN cell does not support constants') |
| 717 | |
| 718 | def step(inputs, states): |
| 719 | constants = states[-self._num_constants:] # pylint: disable=invalid-unary-operand-type |
| 720 | states = states[:-self._num_constants] # pylint: disable=invalid-unary-operand-type |
| 721 | |
| 722 | states = states[0] if len(states) == 1 and is_tf_rnn_cell else states |
| 723 | output, new_states = self.cell.call( |
| 724 | inputs, states, constants=constants, **kwargs) |
| 725 | if not nest.is_sequence(new_states): |
| 726 | new_states = [new_states] |
| 727 | return output, new_states |
| 728 | else: |
| 729 | |
| 730 | def step(inputs, states): |