Snake
class Snake<T : DType, V>(val channels: Int, val name: String = "Snake", initAlpha: Tensor<T, V>? = null) : Module<T, V> , ModuleParameters<T, V> (source)
Snake activation function: f(x) = x + sin²(α * x) / α
Used in audio synthesis models (BigVGAN, Voxtral codec) where it provides periodic inductive bias that helps model audio waveforms.
Parameters
channels
Number of channels (for per-channel alpha)
name
Module name
initAlpha
Initial alpha parameter tensor (shape: channels)