Learn Before
Example
Example of Two-Dimensional Cross-Correlation
To illustrate a two-dimensional cross-correlation operation, consider a input tensor and a kernel tensor. Let the input be and the kernel be . The convolution window begins at the upper-left corner of the input. The input subtensor within this window and the kernel are multiplied elementwise, and the products are summed to yield a single scalar value: . As the window slides across the input tensor from left to right and top to bottom, this process is repeated. The resulting output tensor has a shape of and contains the four derived scalar values, forming the matrix .
0
1
Updated 2026-06-29
Tags
D2L
Dive into Deep Learning @ D2L