The channels-last convention places an image tensor’s color-channel axis after its spatial axes. A batch of images therefore uses the order (samples, height, width, color_depth). section 2.2.8
Batch of grayscale and color images
A batch of 128 grayscale images measuring 256 × 256 has shape (128, 256, 256, 1). The equivalent color-image batch has shape (128, 256, 256, 3). Channels-first would instead place the color axis immediately after the batch axis: (128, 1, 256, 256) or (128, 3, 256, 256). section 2.2.8
Figure 2.3 A rank-4 image data tensor
Use the rank-4 image-tensor figure to visualize how samples, height, width, and color depth form the batch shape. section 2.2.8
