
04 · Reshape and Transpose Real Images
Part III, Block 2 of Tensors for Machine Learning. One idea that prevents many silent bugs:
Changing a tensor’s shape is not the same as moving its axes.
Microscopes and cameras order their axes according to the hardware, not according to what a model expects. Getting this wrong does not crash — the model runs on scrambled data and returns confident, meaningless output. In a drug screen, that is a wrong decision about whether a compound works. The famous version in tech: a model trained in TensorFlow (NHWC) deployed into PyTorch (NCHW) with no transpose.
Study here, then run the real thing: notebook 04 on Colab · the handbook · workshop home
Built from the workshop’s own material by Ravi Kalia and Sebastian Laverde Chunza, CC BY 4.0.
Choose how to study
Flash Cards
Flip between question and answer, in both languages, at your own pace.
Rapid Repetition
Short sessions that resurface exactly what you forget, until it sticks.
Practice Test
Exam-style questions with a score at the end. Find your weak spots.
Quiz Game
Beat the clock: answer before time runs out and raise your high score.
Explore the topics
Read it all?
Rapid repetition replays exactly what you forget — the fastest way to lock it in before the exam.