Zero padding, unit strides

To factor in zero padding (i.e., only restricting to \( s = 1 \)), let's consider its effect on the effective input size: padding with \( p \) zeros changes the effective input size from \( i \) to \( i + 2p \). In the general case, we can infer the following relationship

For any \( i \), \( k \) and \( p \), and for \( s = 1 \),

$$ \begin{equation*} o = (i - k) + 2p + 1. \end{equation*} $$