title: Why do we reshape data?
body: <p>I have got a dataset which consists of 100,000 rows and 12 columns, where each column stands of a certain input to train a sequential GRU model to predict only 1 output. The following is the code for the model:</p>
  <pre><code>model = Sequential()
  model.add(GRU(units=70, return_sequences=True, input_shape=(1,12),activity_regularizer=regularizers.l2(0.0001)))
  model.add(GRU(units=50, return_sequences=True,dropout=0.1))
  model.add(GRU(units=30, dropout=0.1))
  model.add(Dense(units=5))
  model.add(Dense(units=3))
  model.add(Dense(units=1, activation='relu'))
  model.compile(loss=['mae'], optimizer=Adam(lr=0.0001),metrics=['mse']) 
  model.summary() 
  history=model.fit(X_train, y_train, batch_size=1000,epochs=30,validation_split=0.1, verbose=1)
  </code></pre>
  <p>However, before that I had to transform the training dataset from 2D to 3D using  <code>x_train=x.reshape(-1,1,12)</code> and the output from 1D to 2D using <code>y_train=y.reshape(-1,1)</code>. That is the part I really don't understand, why not just keep them as they are?</p>