Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for element-wise cosine .
Saves the input x so the backward pass can compute and
scale the upstream gradient by it. The input is interpreted in radians.
Math
\frac{\partial y}{\partial x} = -\sin(x), \qquad \frac{\partial \mathcal{L}}{\partial x} = -\sin(x)\,\frac{\partial \mathcal{L}}{\partial y}.$$Attributes
schema_v1OpSchemaRegistered as
"cos" with AmpPolicy::Promote.Notes
Dispatch: Accelerate vvcosf/vvcos (CPU) / MLX cos (GPU).