Question 1: Short answer
mediumAI-checkedConvolutional Neural NetworksTo compute corr2d(X, K) with a single matrix product, you copy every kernel-sized window of
X into one row of a matrix A and flatten K into a column vector k; then A @ k,
reshaped, is the output. For a input X and a kernel K (stride 1,
no padding), what is the shape of A?