Something went wrong on our end
-
Martin Beseda authored
ENH: Removed both linking and include dependencies from examples => lib4neuro can be used just by linking it and including its header without any external dependencies needed.
Martin Beseda authoredENH: Removed both linking and include dependencies from examples => lib4neuro can be used just by linking it and including its header without any external dependencies needed.
NeuronLinear.cpp 693 B
//
// Created by fluffymoo on 11.6.18.
//
#include <boost/serialization/export.hpp>
#include "NeuronLinear.h"
#include "NeuronConstant.h"
#include "NeuronSerialization.h"
#include "NeuronLinearSerialization.h"
BOOST_CLASS_EXPORT_IMPLEMENT(NeuronLinear);
NeuronLinear::NeuronLinear( ) {}
double NeuronLinear::activate( double x, double b ) {
return x + b;
}
double NeuronLinear::activation_function_eval_derivative_bias( double x, double b ) {
return 1.0;
}
double NeuronLinear::activation_function_eval_derivative( double x, double b ) {
return 1.0;
}
Neuron* NeuronLinear::get_derivative() {
NeuronConstant* output = new NeuronConstant( 1.0 );
return output;
}