braindecode.functional.rotary_angles#

braindecode.functional.rotary_angles(positions, inv_freq, interleaved=True)[source]#

Rotation angles of each position, laid out to match the feature layout.

Parameters:
Returns:

Shape (..., head_dim); pass .cos() and .sin() to apply_rotary().

Return type:

Tensor