title: LSTM classification for 2D dataset
body: <p>I a dataset with 10000 rows and 4 features (positions of two cars and their velocity) as  x_train and also y_train is my labels which is 0 or 1. I want with LSTM classifying my dataset but the accuracy do not go more than 50 percent. For LSTM I tested both input_shape (10000, 4, 1) and (10000, 1, 4) but accuracy remains around 50 percentage. Do you know what should I do to improve the accuracy? and which of (10000, 4, 1) and (10000, 1, 4) are correct format ?</p>
  <pre><code>x_train, x_test, y_train, y_test = train_test_split(x, label, test_size=0.25, random_state=42)
  x_train = x_train.reshape(-1, 4, 1)
  x_test  = x_test.reshape(-1, 4, 1)
  y_train = y_train.reshape(-1, 1, 1)
  y_test = y_test.reshape(-1, 1, 1) 
  
  model = Sequential()
  model.add(LSTM(256, input_shape=(x_train.shape[1:]), activation='tanh', return_sequences=True))
  model.add(Dropout(0.2))
  model.add(BatchNormalization())
  model.add(LSTM(256, activation='tanh'))
  model.add(Dropout(0.2))
  model.add(BatchNormalization())
  model.add(Dense(128, activation='tanh'))
  model.add(BatchNormalization())
  model.add(Dense(2, activation='softmax'))
  model.compile( loss='binary_crossentropy',
                optimizer='adam',
                metrics=['accuracy'] )
  history = model.fit(x_train, y_train, validation_split=0.33, epochs=20, batch_size=128,shuffle=True )
  </code></pre>