ValueError: Input 0 is incompatible with layer lstm_13: expected ndim=3, found ndim=4 : <p>I am trying for multi-class classification and here are the details of my training input and output:</p>

<blockquote>
  <p>train_input.shape= (1, 95000, 360) (95000 length input array with each
  element being an array of 360 length)</p>
  
  <p>train_output.shape = (1, 95000, 22) (22 Classes are there)</p>
</blockquote>

<pre><code>model = Sequential()

model.add(LSTM(22, input_shape=(1, 95000,360)))
model.add(Dense(22, activation='softmax'))
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
print(model.summary())
model.fit(train_input, train_output, epochs=2, batch_size=500)
</code></pre>

<p>The error is:</p>

<blockquote>
  <p>ValueError: Input 0 is incompatible with layer lstm_13: expected ndim=3, found ndim=4
  in line:
  model.add(LSTM(22, input_shape=(1, 95000,360)))</p>
</blockquote>

<p>Please help me out, I am not able to solve it through other answers.</p>
