def LSTM(lstm, inputs, batch_size=None, dropout_x=0.0, dropout_h=0.0):
    """
    unidirectional LSTM
    :param lstm: one LSTM layer
    :param inputs: # seq_len x batch_size
    :param batch_size:
    :param dropout_x:
    :param dropout_h:
    :return: Output of LSTM layer, seq_len x hidden_dim x batch_size
    """
    s = lstm.initial_state()
    lstm.set_dropouts(dropout_x, dropout_h)
    if batch_size is not None:
        lstm.set_dropout_masks(batch_size)
    hs = s.add_inputs(inputs)
    return hs
