I have data with a shape of (10000, 20, 15, 4)
where num samples = 10000
, num series in time = 20
, height = 15
, weight = 4
. So I have table 15x4
which is distributed over time. Here is the model I want to train it over this data:
...
model.add((LSTM(nums-1,return_sequences=True,input_shape=(20,15,4), activation='relu')))
model.add((LSTM(nums-1,return_sequences=False,input_shape=(20,15,4), activation='tanh')))
model.add(Dense(15,activation='relu'))
...
However, I get the following error:
ValueError: Input 0 is incompatible with layer lstm_1: expected ndim=3,
found ndim=4
How do I define a LSTM layer with 4D input shape?