'LSTM model fails

enter image description here

model = Sequential()
model.add(LSTM(units=32, return_sequences=True, input_shape=(training.shape[1],1)))
model.add(Dropout(0.2))
model.add(LSTM(units=21, return_sequences=True))
model.add(Dropout(0.2))
model.add(LSTM(units=10, return_sequences=True))
model.add(Dropout(0.2))
model.add(LSTM(units=10))
model.add(Dropout(0.2))
model.add(Dense(units=1))

model.compile(optimizer='adam',loss='mean_squared_error', metrics=["accuracy"])
history=model.fit(training,output,epochs=100,batch_size=1)   


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source