apply_output_gate

Function apply_output_gate 

Source
pub fn apply_output_gate(attn: &[f32], g: &[f32], enabled: bool) -> Vec<f32>
Expand description

Apply sigmoid(g) ⊙ attn when the output gate is on; otherwise identity.