new doc and optical backprop
This commit is contained in:
28
include/NeuralNetwork/Learning/OpticalBackPropagation.h
Normal file
28
include/NeuralNetwork/Learning/OpticalBackPropagation.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "./BackPropagation.h"
|
||||
|
||||
namespace NeuralNetwork {
|
||||
namespace Learning {
|
||||
|
||||
/** @class OpticalBackPropagation
|
||||
* @brief
|
||||
*/
|
||||
class OpticalBackPropagation : public BackPropagation {
|
||||
|
||||
public:
|
||||
OpticalBackPropagation(): BackPropagation() {
|
||||
|
||||
}
|
||||
virtual ~OpticalBackPropagation() {
|
||||
}
|
||||
|
||||
protected:
|
||||
inline virtual float correction(const float & expected, const float &computed) const override {
|
||||
register float tmp=(expected-computed);
|
||||
register float ret=1+exp(tmp*tmp);
|
||||
return tmp < 0? -ret:ret;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user