Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

BuiltinFuncs.hpp

2011-04-07
2012-12-27
  • mastertrenten
    mastertrenten
    2011-04-07

    Hi,

    in BuiltinFuncs.hpp the sqr and  sigmoid are wrong i think:

    static inline float sqr_wrapper(float * arg_list) {
    return pow(2, arg_list[0]);
    }
    static inline float sigmoid_wrapper(float * arg_list) {
    return (RR / (1 + exp( -(((float)(arg_list[0])) * arg_list[1]) / R) - R));
    }
    

    should be

    static inline float sqr_wrapper(float * arg_list) {
    return pow(arg_list[0],2);
    }
    static inline float sigmoid_wrapper(float * arg_list)
    {
        double t = (1+exp(-arg_list[0]*arg_list[1]));
        return (fabs(t) > 0.00001) ? 1.0/t : 0;
    }
    
     
  • r1364. Can't believe this existed for so long.