I want to apply 1-dimensional convolution on my 29 feature input data (as in 29x1 shape). I tell Keras that input_shape=(29,1)
but I get an error that it was expecting the input "to have 3 dimensions, but got array with shape (4000, 29)". Why is Keras expecting 3 dimensions?
Keras docs give this weird example of how to use input_shape:
(None, 128) for variable-length sequences with 128 features per step.
I'm not sure what they mean by variable-length sequence, but since I have 29 features I also tried (None,29)
and (1,29)
and got similar errors with those.
Am I misunderstanding something about what a 1-dimensional convolution does?
Here is a visual depiction of what I expect a Conv1D to do with a kernel size of 3, given 7x1 input.
[x][x][x][ ][ ][ ][ ]
[ ][x][x][x][ ][ ][ ]
[ ][ ][x][x][x][ ][ ]
[ ][ ][ ][x][x][x][ ]
[ ][ ][ ][ ][x][x][x]