#ifndef _OPT_BACK_PROPAGATION_H_ #define _OPT_BACK_PROPAGATION_H_ #include "BackPropagation.h" /* * http://proceedings.informingscience.org/InSITE2005/P106Otai.pdf */ namespace NeuralNetwork { namespace Learning { class OpticalBackPropagation : public BackPropagation { public: inline OpticalBackPropagation(LayerNetwork &n): BackPropagation(n) {} protected: virtual float correction(const float& expected, const float& computed) override { register float tmp=(expected-computed); register float ret=1+exp(tmp*tmp); return tmp < 0? -ret:ret; }; }; } } #endif