I have a sequence input in this shape: (6000, 64, 100, 50)
The 6000
is just the number of sample sequences. Each sequences is 64
in length.
I plan to fit this input into an LSTM using Keras.
I setup my input this way:
input = Input(shape=(64, 100, 50))
This gives me an input shape of (?, 64, 100, 50)
However, when I put input
into my LSTM like so:
x = LSTM(256, return_sequences=True)(input)
I get this error:
Input 0 is incompatible with layer lstm_37: expected ndim=3, found ndim=4
This would have worked if my input shape was something like (?, 64, 100)
, but not when I've a 4th dimension.
Does this mean that LSTM can only take an input of 3 dimensional? How can I feed a 4 or even higher dimension input into LSTM using Keras?