Skip to main content

angle_increment

Function angle_increment 

Source
pub fn angle_increment<const D: usize, const DP1: usize>(
    rot: Tensor<D>,
    dt: Tensor<D>,
    range: f64,
) -> Tensor<DP1>
Expand description

The abelian per-step angle increment θ̂ₜ = Δₜ · range·π·tanh(ϑₜ), one per head and rotation pair.

DP1 = D + 1: the head axis is inserted before the pair axis, so a sequence-shaped call (rot [b, s, a], dt [b, s, h]) yields [b, s, h, a] and a single-token call (rot [b, a], dt [b, h]) yields [b, h, a].