| 38 | static inline float leaky_activate(float x){return (x>0) ? x : .1*x;} |
| 39 | static inline float tanh_activate(float x){return (exp(2*x)-1)/(exp(2*x)+1);} |
| 40 | static inline float plse_activate(float x) |
| 41 | { |
| 42 | if(x < -4) return .01 * (x + 4); |
| 43 | if(x > 4) return .01 * (x - 4) + 1; |
| 44 | return .125*x + .5; |
| 45 | } |
| 46 | |
| 47 | static inline float lhtan_activate(float x) |
| 48 | { |