summaryrefslogtreecommitdiff
path: root/candle-nn/src/activation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'candle-nn/src/activation.rs')
-rw-r--r--candle-nn/src/activation.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/candle-nn/src/activation.rs b/candle-nn/src/activation.rs
index 799e2ee2..77e709d2 100644
--- a/candle-nn/src/activation.rs
+++ b/candle-nn/src/activation.rs
@@ -14,6 +14,7 @@ pub enum Activation {
Silu,
Sigmoid,
HardSigmoid,
+ Swiglu,
Swish,
HardSwish,
Elu(f64),
@@ -32,6 +33,7 @@ impl super::Module for Activation {
Self::Silu => crate::ops::silu(xs),
Self::Sigmoid => crate::ops::sigmoid(xs),
Self::HardSigmoid => crate::ops::hard_sigmoid(xs),
+ Self::Swiglu => crate::ops::swiglu(xs),
Self::Swish => xs * crate::ops::sigmoid(xs)?,
Self::HardSwish => xs * crate::ops::hard_sigmoid(xs)?,
&Self::Elu(alpha) => xs.elu(alpha),