diff --git a/lib/nn.js b/lib/nn.js index 0cb4527..4e61c92 100644 --- a/lib/nn.js +++ b/lib/nn.js @@ -17,6 +17,11 @@ let tanh = new ActivationFunction( y => 1 - (y * y) ); +let tanh = new ActivationFunction( + x => (x<0)?0:x, + y => (x<0)?0:1 +); + class NeuralNetwork { /*