aboutsummaryrefslogtreecommitdiff
path: root/chapters/activation_funcs.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'chapters/activation_funcs.adoc')
-rw-r--r--chapters/activation_funcs.adoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chapters/activation_funcs.adoc b/chapters/activation_funcs.adoc
index 84a1039..87f213c 100644
--- a/chapters/activation_funcs.adoc
+++ b/chapters/activation_funcs.adoc
@@ -58,7 +58,7 @@ The sigmoid table has 513 entries each of 16-bit precision and covering the inpu
[source,c++]
----
-int sigmoid_reference(int x) {|// input x range is -256 to + 256 inclusive
+int16_t sigmoid_reference(int16_t x) { // input x range is -256 to + 256 inclusive
F64 v = (double)x / (double)16;
v = 1.0/(1.0 + exp(-v));
return round_to_nearest_int(32768.0 * v);
@@ -95,7 +95,7 @@ The tanh_table has 513 entries each of 16-bit precision and covering the input r
[source,c++]
----
-int tanh_reference(int x) { // input x range is -256 to +256 inclusive
+int16_t tanh_reference(int16_t x) { // input x range is -256 to +256 inclusive
F64 v = (double)x/(double)32;
v = exp(-2.0*v);
v = (1.0-v)/(1.0+v);