How do I properly deal with 1 dimensional input in Keras Conv1D?

Viewed 704

So I'm trying to train a model in Keras that takes in frames of signals that are of a shape (750,1). My first layer is the following Conv1D layer:

Conv1D(128, 5,input_shape=(1,750) padding='valid', activation='relu', strides=1)

But this gives me the following error:

ValueError: Negative dimension size caused by subtracting 5 from 1 for 'conv1d_1/convolution/Conv2D' (op: 'Conv2D') with input shapes: [?,1,1,750], [1,5,750,128].

Which seems to indicate that the layer is trying to apply a 5x5 kernel to the 1 dimensional data which doesn't make much sense. Any other input shapes just seem to throw different less useful errors. What am I doing wrong? Am I completely misunderstanding Conv1D ?

0 Answers
Related