Count the fourth window, not a fifth
numeric▲△△Compute the output length for input seven, kernel three, dilation one, padding one on each side and stride two. List padded-coordinate origins. Then choose padding for a width-four, stride-one kernel to retain length seven.
Hint
Use the effective span, and require the last tap to stay inside the padded input.
Solution
Equation (I.11.4) gives . In a padded input of length nine, origins end at . Origin eight would end at ten and does not fit.
For width four at stride one, total padding must be three. Splits and both preserve length but shift alignment differently. Equal integer padding cannot sum to three. The phrase ‘same size’ does not determine which side gets the extra value.