An example LSTM structure:

Code
create_model <- function(batchSize) {
  dropout <- 0.3
  model <- keras_model_sequential() 
  model %>%
    layer_lstm(batch_input_shape =  c(batchSize, 1, 27), units = 128, return_sequences = TRUE, stateful = TRUE, dropout = dropout, recurrent_dropout = dropout) %>%
    layer_lstm(units = 64, return_sequences = TRUE, stateful = TRUE, dropout = dropout, recurrent_dropout = dropout) %>%
    layer_lstm(units = 8, return_sequences = FALSE, stateful = TRUE, dropout = dropout, recurrent_dropout = dropout) %>%
    layer_dense(units = 1, activation = 'sigmoid')
}