Skip to main content

//clika-runtime/io.clika.runtime/Ops/snake

snake

[common]
fun snake(input: Tensor, alpha: Tensor? = null, beta: Tensor? = null, eps: Double = 1.0E-9): Tensor

snake(input: Tensor, alpha: Tensor? = null, beta: Tensor? = null, eps: Double = 1e-9): the snake operator. Periodic "snake" activation (neural vocoders), per channels-last channel. alpha (frequency) and beta (magnitude) are rank-1 [C] tensors over input's last dim, in the REAL domain. Apply exp once at setup for a log-scale checkpoint parameterization. beta absent selects the plain form (beta = alpha). One fused pass; the composed spelling costs five elementwise calls over the whole stream.