GPLIB++
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Neural_Network
BipolarActivationFunction.cpp
Go to the documentation of this file.
1
#include "
BipolarActivationFunction.h
"
2
#include <cmath>
3
#include "NumUtil.h"
4
#include <iostream>
5
6
namespace
gplib
7
{
8
BipolarActivationFunction::BipolarActivationFunction
()
9
{
10
}
11
BipolarActivationFunction::~BipolarActivationFunction
()
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
}
BipolarActivationFunction.h
gplib::BipolarActivationFunction::CalcDeriv
virtual double CalcDeriv(const double input)
The derivative of the function defined in CalcOutput.
Definition:
BipolarActivationFunction.cpp:20
gplib::BipolarActivationFunction::BipolarActivationFunction
BipolarActivationFunction()
Definition:
BipolarActivationFunction.cpp:8
gplib::BipolarActivationFunction::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...
Definition:
BipolarActivationFunction.cpp:15
gplib::BipolarActivationFunction::~BipolarActivationFunction
virtual ~BipolarActivationFunction()
Definition:
BipolarActivationFunction.cpp:11
Generated on Wed May 25 2016 14:21:06 for GPLIB++ by
1.8.6