Elementwise Ops & Reductions
Sum, mean, max across chosen axes.
Two Kinds of Operations
Tensor math splits into two families: elementwise ops that keep the shape, and reductions that collapse it down to fewer numbers.
Elementwise Keeps the Shape
An elementwise op applies the same action to every entry independently. Input shape in, same shape out, no mixing between positions.
b = a * 2 + 1
# same shape as a, every element transformedAll lessons in this course
- Why Loops Are Slow for Math
- Elementwise Ops & Reductions
- Matrix Multiply with matmul and @
- Dot Products Power Every Layer