I trying to understand working of LSTM So I'm doing simple code to simulate its action.
x=[[i for i in range(j,j+5)] for j in range(1000)] x=np.array(x) x=x.reshape((1000,5,1)) y=[i+5 for i in range(1000)] y=np.array(y) y=y.reshape((1000,1,1))
Where x is timeseries like [0,1,2,3,4],[1,2,3,4,5]... so on. Where y is like 5,6... so on.
My Model is
model=keras.Sequential() model.add(keras.layers.LSTM(1)) model.compile(loss="mean_absolute_error",optimizer="adam") model.fit(x,y,epochs=500)
Now starting error very large like in 500s and it decreases very slow. Is it normal?