def _init_state(self, encoder_hidden):
    ' Initialize the encoder hidden state. '
    if (encoder_hidden is None):
        return None
    if isinstance(encoder_hidden, tuple):
        encoder_hidden = tuple([self._cat_directions(h) for h in encoder_hidden])
    else:
        encoder_hidden = self._cat_directions(encoder_hidden)
    return encoder_hidden
Initialize the encoder hidden state.
def _init_state(self, encoder_hidden):
    '  '
    if (encoder_hidden is None):
        return None
    if isinstance(encoder_hidden, tuple):
        encoder_hidden = tuple([self._cat_directions(h) for h in encoder_hidden])
    else:
        encoder_hidden = self._cat_directions(encoder_hidden)
    return encoder_hidden