
This figure is fairly intuitive. Below I'll use it as an example. It goes from left to right in 6 steps, and I'm ignoring the softmax output in the sixth step here.
Step 1:
In the matrix in Step 1, each row corresponds to a word vector. Stacked vertically, they form a matrix that represents a sentence, with shape 7x5 (word-vector dimension is 5, and there are 7 words in total).
Step 2:
Start constructing the convolution kernels. In the example in this figure, consider three filter widths (2, 3, 4), with two filters for each width (producing two feature maps).
In simple terms, a filter represents a collection of some convolution kernels. Suppose there is an original input with 3 channels and two convolution kernels (i.e., 2 channels). These two kernels will each convolve once on every channel, ultimately producing 6 results (because the original input has 3 channels, one kernel is applied three times). Then add together the results generated by the same kernel, finally producing two feature maps, and the filter refers to the set of these two convolution kernels.
In the single-channel case (i.e., one convolution kernel), the kernel and the filter can be seen as the same thing.
For more details, see this article: The difference between convolution kernel (kernel) and filter (filter)_the difference between filter and kernal-CSDN Blog
As can be seen, the kernel size here is region \times d, where region is the width and d is the word-vector dimension.
Step 3:
After convolution, each width produces two feature maps. Because this is 1D convolution, the convolution here is in the vertical direction of the original input on the left. In this example, stride=1 and padding=0.
Step 4:
Then perform 1D max pooling. Each feature map is pooled into a single value, leaving 6 values.
Step 5:
Concatenate these six values together to form a feature vector again.
