Skip to content
Snippets Groups Projects
NeuronLinear.cpp 693 B
Newer Older
  • Learn to ignore specific revisions
  • //
    // Created by fluffymoo on 11.6.18.
    //
    
    
    #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 ) {
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        return  x + b;
    
    double NeuronLinear::activation_function_eval_derivative_bias( double x, double b ) {
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        return 1.0;
    }
    
    double NeuronLinear::activation_function_eval_derivative( double x, double b ) {
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        return 1.0;
    
    Neuron* NeuronLinear::get_derivative() {
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        NeuronConstant* output = new NeuronConstant( 1.0 );