Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* DESCRIPTION OF THE CLASS
*
* @author Martin Beseda
* @author Martin Mrovec
* @author Michal Kravčenko
* @date 2017 - 2019
*/
#ifndef INC_4NEURO_NEURONBINARYBIASED_H
#define INC_4NEURO_NEURONBINARYBIASED_H
#include "NeuronBiased.h"
namespace lib4neuro {
/**
* BinaryBiased neuron class - uses unit-step as the activation function
*/
class NeuronBinaryBiased : public NeuronBiased {
public:
/**
* Struct used to access private properties from
* the serialization function
*/
struct access;
/**
* Default constructor for the BinaryBiased Neuron
* @param[in] threshold Denotes when the neuron is activated
* When neuron potential exceeds 'threshold' value it becomes excited
*/
LIB4NEURO_API explicit NeuronBinaryBiased(double b = 0.0);
/**
* Performs the activation function and stores the result into the 'state' property
*/
LIB4NEURO_API double activate(double x,
double b) override;
LIB4NEURO_API double activation_function_eval_derivative_bias(double x,
double b) override;
LIB4NEURO_API double activation_function_eval_derivative(double x,
double b) override;
LIB4NEURO_API Neuron* get_derivative() override;
};
}
#endif //INC_4NEURO_NEURONBINARYBIASED_H