Skip to main content

causal_conv1d_update_silu

Function causal_conv1d_update_silu 

Source
pub fn causal_conv1d_update_silu(
    conv_state: &[f32],
    input: &[f32],
    weight: &[f32],
    bias: &[f32],
    batch: usize,
    channels: usize,
    kernel_size: usize,
) -> (Vec<f32>, Vec<f32>)
Expand description

Depthwise causal conv1d decode step with in-place rolling state and SiLU.

input and out are [batch, channels]. conv_state is [batch, channels, kernel_size] and is shifted left by one slot per channel before inserting the new input at kernel_size - 1. weight is [channels, kernel_size], bias is [channels], and the returned output is silu(dot(updated_state, weight) + bias).