title: how can i solve the stacking deep learning problem
body: <p>I'm about to develop a stacking deep learning ensemble model.. I have a problem and I couldn't solve it.</p>
  <pre><code>def stacked_dataset(members, inputX):
      stackX = None
      for model in members:
          # make prediction
          yhat = model.predict(inputX, verbose=0)
          # stack predictions into [rows, members, probabilities]
          if stackX is None:
              stackX = yhat
          else:
              stackX = np.dstack((stackX, yhat))
      # flatten predictions to [rows, members x probabilities]
      stackX = stackX.reshape((stackX.shape[shape]))
      return stackX
  </code></pre>
  <p>the error is :</p>
  <pre><code>ValueError: y should be a 1d array, got an array of shape (42541, 11, 2) instead.
  
  </code></pre>
  <p>How can I solve it while I'm running the fitting
  model = <code>fit_stacked_model(members, x_test, testy_enc)</code></p>
  <p>I expect the it would fit the stacking model.</p>