Learn Before
Example
Example of Two-Dimensional Cross-Correlation
To illustrate a two-dimensional cross-correlation operation, consider an input tensor with a shape of and a kernel tensor with a shape of . 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: , , , and .
0
1
Updated 2026-05-09
Tags
D2L
Dive into Deep Learning @ D2L