Suppose that we have a dataset with N labeled instances, and each instance is a 2D matrix of 2 X M. That is, each instance has two rows, where each row is a vector of size M (M columns).
I would like to build a NN whose first layer performs a convolution operation, with a kernel with two rows and one column. The idea is to apply this kernel to each column of the input matrix, generating a single value for each column as result. The idea would be generating as output a vector of size M, where each position P of the vector would be generated by a convolution of the two rows in column P. The following picture illustrates the idea.
I don't know how to build this convolutional layer. Do I need a 1D or a 2D convolution in this case?
I would like to build a NN with the following architecture:
- Convolutional layer with inputs of 2 X M and outputs of M. I would like to apply k kernels (producing k vectors of size M)
- Dense layer with 500 neurons and relu activation.
- Dropout of 0.2
- Dense layer with 2 neurons and softmax activation.
Can you help me in building this architecture?
