How to properly handle one-dimensional input in Keras Conv1D?

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

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 1D data, which doesn't make much sense. Any other form of input seems to throw various less useful errors. What am I doing wrong? Am I completely misunderstanding Conv1D?

+3


source to share





All Articles