def operations
stelliferous@0.0.2.0 · math_activation.bend:107
import stelliferous@0.0.2.0/math_activation.bend as MathActivation
import Base
107
108def operations(activation: Activation) -> F32:
109 match activation:
110 case Identity{}: 0.0
111
112 case ReLU{}: 2.0
113 case ReLU6{}: 4.0
114
115 case LeakyReLU{slope}: 3.0
116
117 case Sigmoid{}: 3.875
118
119 case SiLU{}: 4.25
120
121 case Tanh{}: 6.75
122
123 case HardSigmoid{}: 6.0
124 case HardSwish{}: 7.0
125
126 case GELUTanh{}: 7.75
127 case Custom{operations}: operations