as_strided: Linking stepsize (strides of conv2d) with as_strided strides parameter
问题 I found that for generating (X - x + 1, Y - y + 1) patches of size (x,y) from (X,Y) with stride 1, image requires us to give strides parameter as img.strides * 2 or img.strides + img.strides . I don't know how they quickly compute this knowing the no. of strides in conv2d But what should I do to get ((X-x)/stride)+1, ((Y-y)/stride)+1 patches of same size from same sized image with stride stride? From this SO answer with slight modification, with channels and number of images placed in front