Example

ResNeXt Block Shape Preservation Example

When a ResNeXt block is instantiated without applying a spatial stride (e.g., use_1x1conv=False, strides=1), the input and output tensors retain the exact same shape. For instance, passing a random input tensor of shape (4,32,96,96)(4, 32, 96, 96)—representing a batch size of 44, 3232 input channels, and 96×9696 \times 96 spatial dimensions—through a ResNeXtBlock configured with 3232 output channels, 1616 groups, and a bottleneck multiplier of 11 results in an output tensor of identical shape (4,32,96,96)(4, 32, 96, 96). This behavior confirms that the sequential bottleneck convolutions and grouped convolutions preserve both spatial resolution and channel depth when downsampling is omitted.

0

1

Updated 2026-05-13

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L