Newer
Older
Martin Beseda
committed
#include <boost/serialization/export.hpp>
Martin Beseda
committed
#include "NeuronConstant.h"
#include "NeuronSerialization.h"
#include "NeuronLinearSerialization.h"
Martin Beseda
committed
BOOST_CLASS_EXPORT_IMPLEMENT(lib4neuro::NeuronLinear);
Martin Beseda
committed
namespace lib4neuro {
NeuronLinear::NeuronLinear() {}
double NeuronLinear::activate(double x,
double b) {

Michal Kravcenko
committed
this->activation_val = x + b;
return this->activation_val;
Martin Beseda
committed
}
double NeuronLinear::activation_function_eval_derivative_bias(double x,
double b) {
Martin Beseda
committed
return 1.0;
}
double NeuronLinear::activation_function_eval_derivative(double x,
double b) {
Martin Beseda
committed
return 1.0;
}
Neuron* NeuronLinear::get_derivative() {
NeuronConstant* output = new NeuronConstant(1.0);
Martin Beseda
committed
return output;
}