Multiple output for multi step ahead prediction using LSTM with keras
model = Sequential()
model.add(LSTM(input_dim=n_features, output_dim=neurons))
model.add(Dropout(.2))
model.add(Flatten())
model.add(Dense(ahead))
model.compile(loss='mae', optimizer='adam')
model.fit(X, y, epochs=50)


The differences include: 


I'm flattening the output from LSTM, cause it's going to give a 3D tensor and a Dense layer for this scenario I believe is going to expect a 2D tensor.
Made the change the change suggested in another answer.
Removed the activation layer, since default activation of Keras dense layer is linear.