Example

Example of Multi-Output Channel Convolution Kernel Construction

We can construct a multi-output channel convolution kernel programmatically by concatenating existing kernel tensors. For example, if K is a multi-input channel kernel tensor for a single output channel, we can stack K, K + 1, and K + 2 along dimension 0 to create a kernel with three output channels. If the original K had a shape of 2×2×22 \times 2 \times 2 (representing ci×kh×kwc_{\textrm{i}} \times k_{\textrm{h}} \times k_{\textrm{w}}), the new stacked kernel will have an overall shape of 3×2×2×23 \times 2 \times 2 \times 2.

0

1

Updated 2026-07-04

Tags

D2L

Dive into Deep Learning @ D2L