'Returns stacked and batched initial states for the bi-LSTM.'

def _create_initial_states(self, stride):

    initial_states_forward = []
    initial_states_backward = []
    for index in range(len(self._hidden_layer_sizes)):
        states_sxd = []
        for direction in ['forward', 'backward']:
            for substate in ['c', 'h']:
                state_1xd = self._component.get_variable(('initial_state_%s_%s_%d' % (direction, substate, index)))
                state_sxd = tf.tile(state_1xd, [stride, 1])
                states_sxd.append(state_sxd)
        initial_states_forward.append(tf.contrib.rnn.LSTMStateTuple(states_sxd[0], states_sxd[1]))
        initial_states_backward.append(tf.contrib.rnn.LSTMStateTuple(states_sxd[2], states_sxd[3]))
    return (initial_states_forward, initial_states_backward)
