Learn Before
Concept
Tensor Reduction along an Axis
Instead of reducing an entire tensor to a single scalar, mathematical reduction operations like summation can be targeted along specific axes. For instance, summing an matrix along its rows (axis ) eliminates the row dimension, yielding an output vector. Similarly, summing along the column dimension (axis ) produces a vector by adding elements across columns. Reducing a tensor along all of its axes simultaneously is mathematically equivalent to computing the total sum of all its elements.
0
1
Updated 2026-05-02
Tags
D2L
Dive into Deep Learning @ D2L