Same shape, different meaning
digit_batch and video_patch are both (8, 8, 8). One is eight handwritten digits; the other is eight frames of a clip.
And digits.images is (1797, 8, 8) while a photo is (512, 512, 3). Both are order 3, but axis 0 counts whole images in one and rows of pixels in the other.
Before you run a line of code, say what every axis counts.