Concept
Image Minibatch Tensor Dimensions
When processing collections of images in deep learning, it is common practice to read and represent a minibatch as a -order tensor with the specific shape format of (batch size, number of channels, height, width). In this structure, the first dimension indexes the individual images within the batch, the second specifies the color channels (e.g., for grayscale images or for RGB), and the final two dimensions capture the spatial height and width.
0
1
Updated 2026-05-03
Tags
D2L
Dive into Deep Learning @ D2L