tezvyn:

Zero-padding vs reflect vs replicate padding and their visual artifacts

Source: shadecoder.comintermediate

This tests boundary assumptions in convolution. Zero-padding adds black borders causing dark vignettes; reflect padding mirrors edges for continuity; replicate padding repeats edge values outward. A red flag is saying padding choice does not affect outputs.

This tests boundary assumptions in convolution and their perceptual consequences. A strong answer covers three modes: zero-padding treats outside as empty, causing dark vignettes; reflect-padding mirrors edges, preserving continuity; replicate-padding repeats edge values, creating flat streaks. Zero-padding is the common deep learning default, while reflect and replicate suit image-to-image tasks to avoid artificial dark borders. A red flag is treating padding as only a size convenience rather than a modeling decision changing edge behavior.

Read the original → shadecoder.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Zero-padding vs reflect vs replicate padding and their visual artifacts · Tezvyn