title: How to use Conv1D as an input layer
body: <p>I am trying to use Conv1d as a first layer. I read the link <a href="https://keras.io/api/layers/convolution_layers/convolution1d/" rel="nofollow noreferrer">https://keras.io/api/layers/convolution_layers/convolution1d/</a> but failed to understand.</p>
  <p>If I use the first layer as dense like</p>
  <pre><code>model.add(keras.layers.Dense(12, input_dim=232, activation='relu'))
  </code></pre>
  <p>it works fine but if try to use the first layer as Conv1d like</p>
  <pre><code>model.add(keras.layers.Conv1D(32, 5, activation = 'relu')) 
  </code></pre>
  <p>I get an error as:</p>
  <pre><code> Input 0 of layer &quot;conv1d&quot; is incompatible with the layer: expected min_ndim=3, found ndim=2. Full shape received: (1, 232)
  </code></pre>
  <p>My input size is 3000X232 and I am trying to learn whether a particular vector is present or not. So my output is either 0 or 1. If the vector is present in the input, the output is 1 and if the vector is absent in the input the output is 0. So I am learning a simple two-class classifier.</p>
  <p>Can anyone help? Is it that there must be at least 2 spatial dimensions to use Conv1D?</p>