Skip to content

Commit ce3867e

Browse files
committed
Rename the tangent functions to tanh because that's what they are
1 parent a6599bf commit ce3867e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

neuralNet.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ object NeuralNetUtilities {
6060
return input * (1 - input)
6161
}
6262

63-
def tangentPrime(input : Double) : Double = {
63+
def tanhPrime(input : Double) : Double = {
6464
return 3.4318*scala.math.pow((1/scala.math.cosh(2*input)), 2)
6565
}
6666

@@ -168,7 +168,7 @@ object NeuralNetUtilities {
168168
}
169169

170170
/** tanh activation function */
171-
def tangent(input : Double) : Double = {
171+
def tanh(input : Double) : Double = {
172172
return 1.7159 * scala.math.tanh(2/3*input)
173173
}
174174

0 commit comments

Comments
 (0)