Skip to content
Snippets Groups Projects
NeuronLinear.cpp 783 B
Newer Older
#include "NeuronLinear.h"
#include "NeuronConstant.h"
#include "NeuronSerialization.h"
#include "NeuronLinearSerialization.h"
BOOST_CLASS_EXPORT_IMPLEMENT(lib4neuro::NeuronLinear);
namespace lib4neuro {
    NeuronLinear::NeuronLinear() {}
    double NeuronLinear::activate(double x, double b) {
        this->activation_val = x + b;
        return this->activation_val;
    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;
    }