GPLIB++
BipolarActivationFunction.cpp
Go to the documentation of this file.
2 #include <cmath>
3 #include "NumUtil.h"
4 #include <iostream>
5 
6 namespace gplib
7  {
9  {
10  }
12  {
13  }
14 
15  double BipolarActivationFunction::CalcOutput(const double input)
16  {
17  return (tanh(0.5 * input));
18  }
19 
20  double BipolarActivationFunction::CalcDeriv(const double input)
21  {
22  return (0.5 * 1. / pow2(cosh(input)));
23  }
24  }
virtual double CalcDeriv(const double input)
The derivative of the function defined in CalcOutput.
virtual double CalcOutput(const double input)
The function that maps between the weighted sum that's the input of the neuron and the output...