I have a matrix:
A1 A2 A3 A4 A5 ... B1 B2 B3 B4 B5 ... C1 C2 C3 C4 C5 ... D1 D2 D3 D4 D5 ... .. .. .. .. ..
I would like to apply a 2d conv kernel of size (2,3) to this matrix. The kernel should jump the rows with steps of 2, i.e. in the first stride it should encompass row A and B, in the second stride step it should consider row C and D, just like below (the kernel is represented by [.] and the matrix after >> shows how the kernel moves from left to right; not necessary, but I had fun typing these matrices ;)):
First “Stride Step”:
[A1 A2 A3] A4 A5 ... >> A1 [A2 A3 A4] A5 ... [B1 B2 B3] B4 B5 ... >> B1 [B2 B3 B4] B5 ... C1 C2 C3 C4 C5 ... >> C1 C2 C3 C4 C5 ... D1 D2 D3 D4 D5 ... >> D1 D2 D3 D4 D5 ...
Second “Stride Step”:
A1 A2 A3 A4 A5 ... >> A1 A2 A3 A4 A5 ... B1 B2 B3 B4 B5 ... >> B1 B2 B3 B4 B5 ... [C1 C2 C3] C4 C5 ... >> C1 [C2 C3 C4] C5 ... [D1 D2 D3] D4 D5 ... >> D1 [D2 D3 D4] D5 ...
In my application, it is crucial that the kernel does not combine any rows other than the pairs AB and CD (i.e. for instance not BC). The setting that I chose was simply stride = (2,1) with ‘valid’ padding (i.e. padding = 0). Just to ensure, are these the correct settings?