Keras - 1D Convolution How it works : <p>From this example: 
<a href="https://github.com/fchollet/keras/blob/master/examples/imdb_cnn.py" rel="noreferrer">https://github.com/fchollet/keras/blob/master/examples/imdb_cnn.py</a></p>

<p>comes this snippet below. The embedding layer outputs a 400 x 50 matrix for each example in a batch. My question is how does the 1D convolution work? How does it work across the 400 x 50 matrix?</p>

<pre><code># we start off with an efficient embedding layer which maps
# our vocab indices into embedding_dims dimensions
model.add(Embedding(max_features,
                    embedding_dims,
                    input_length=maxlen,
                    dropout=0.2))

# we add a Convolution1D, which will learn nb_filter
# word group filters of size filter_length:
model.add(Convolution1D(nb_filter=nb_filter,
                        filter_length=filter_length,
                        border_mode='valid',
                        activation='relu',
                        subsample_length=1))
</code></pre>
