Learn Before
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)—representing a batch size of , input channels, and spatial dimensions—through a ResNeXtBlock configured with output channels, groups, and a bottleneck multiplier of results in an output tensor of identical shape (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
Tags
D2L
Dive into Deep Learning @ D2L