Learn Before
Example
Tensor Broadcasting Example
When applying the broadcasting mechanism to add a matrix a and a matrix b, a deep learning framework cannot perform a direct elementwise addition because their shapes do not match. Instead, broadcasting resolves this by producing a larger matrix: it replicates matrix a along its columns and matrix b along its rows. Once both matrices are expanded to the identical shape, their elements are successfully added together.
0
1
Updated 2026-05-01
Tags
D2L
Dive into Deep Learning @ D2L