braindecode.functional.rotate_half#
- braindecode.functional.rotate_half(x)[source]#
Rotate the two feature halves from
(a, b)to(-b, a).The half-split layout of GPT-NeoX / LLaMA rotary embeddings; see
rotate_pairs()for the interleaved layout.
Rotate the two feature halves from (a, b) to (-b, a).
The half-split layout of GPT-NeoX / LLaMA rotary embeddings; see
rotate_pairs() for the interleaved layout.