We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2b6424 commit 1e23894Copy full SHA for 1e23894
NN/FFN/basicFFN/include/ffn.hxx
@@ -72,7 +72,7 @@ class FFN {
72
static FP sigmoid(FP x) { return 1 / (1 + std::exp(-x)); }
73
static FP sigmoid_deriv(FP y) { return y * (1 - y); }
74
static FP tanh(FP x) {
75
- return (std::exp(x) - std::exp(-x)) / (std::exp(x) - std::exp(-x));
+ return (std::exp(x) - std::exp(-x)) / (std::exp(x) + std::exp(-x));
76
}
77
static FP tanh_deriv(FP y) { return 1 - y * y; }
78
0 commit comments