Newer
Older
//
// Created by fluffymoo on 11.6.18.
//
#include "NeuronLinear.h"

Michal Kravcenko
committed
double NeuronLinear::activate( double x ) {
double b = 0.0;
if( this->bias ){
b = *this->bias;
double NeuronLinear::activation_function_eval_derivative_bias( double x ) {
return 1.0;
}
double NeuronLinear::activation_function_eval_derivative( double x ) {
return 1.0;

Michal Kravcenko
committed
Neuron* NeuronLinear::get_derivative() {
NeuronConstant* output = new NeuronConstant( 1.0 );

Michal Kravcenko
committed
return output;
}
//template<class Archive>
//void NeuronLinear::serialize(Archive & ar, const unsigned int version) {
// ar & boost::serialization::base_object<Neuron>(*this);
//}