Proposition 2I.11.P0237 of 100 in the corpus
Output size is a count of valid kernel origins.
Kernel span, both padding widths, stride and the boundary convention determine the output grid. Dilation belongs in the calculation.
Count the last window that fits
Work along one axis. The unpadded input has length , the left and right padding widths are , kernel width is , dilation is , and stride is . The effective kernel span is .
A window with origin in padded coordinates occupies positions through . It fits exactly when . Therefore . Counting integer origins starting at zero yields
The floor comes from counting complete windows, not from a rounding preference.
Equation (I.11.4) assumes positive integer kernel, stride and dilation, non-negative padding, and at least one fitting window. A padded input smaller than the effective kernel is not a valid positive-sized output for this convention. Apply the same derivation independently to height and width.
For , , , and , the result is . The padded origins are . Origin eight would overrun the padded length nine and is not evaluated.
The diagram compares this with the stride-one outputs of widths five and seven. I.11.B03 adds channels, batches and dilation.
“Same” must name an alignment convention
At stride one, keeping the input size requires total padding . If is odd this can be split equally. If is even, equal integer padding cannot give exactly that total.
A common stride- convention chooses output length and total padding
When is odd, assigning the extra element to the left rather than the right changes alignment even though the shape is identical. Frameworks do not all support the same named modes for every stride; the documented PyTorch Conv2d string mode ‘same’, for example, requires stride one. Record actual padding widths when reproducing a model.
Two arrays can have equal shapes and refer to different input centres. For a feature whose preceding input-centre jump is , a layer shifts the first centre by . With even kernels this may be a half-grid offset. Shape equality alone is not sufficient evidence that decoder and skip-connection features align spatially.
A transposed convolution follows the backward connectivity
Flatten a bias-free convolution into a matrix so that . Then a linear objective with upstream vector has input gradient . A transposed convolution computes this adjoint connectivity, summing contributions wherever output windows overlap.
For symmetric padding, its common one-axis shape formula is
A shape choice resolves stride ambiguity; it cannot reverse information loss.
Here is the output-padding shape parameter. In the usual stride-ambiguity case choose ; consult the operator’s documented constraints for other dilation combinations. Different input sizes can have the same forward output size because of the floor in (I.11.4). The parameter selects a compatible output shape.
It does not mean that the operator pads missing observations back into existence. A map from four coordinates to two cannot have a two-sided inverse. I.11.X07 writes its matrix, verifies the adjoint identity and chooses the output shape explicitly.
For segmentation, upsampling restores the size of a prediction grid. Whether it restores useful detail depends on the representations available to the decoder. Equal image dimensions do not prove reconstruction.
Sources
Depends on
Used by
Nothing yet.