44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <cmath>
|
|
|
|
#include <NeuralNetwork/FeedForward/Network.h>
|
|
#include "BatchPropagation.h"
|
|
|
|
namespace NeuralNetwork {
|
|
namespace Learning {
|
|
|
|
/** @class QuickPropagation
|
|
* @brief
|
|
*/
|
|
class QuickPropagation : public BatchPropagation {
|
|
|
|
public:
|
|
inline QuickPropagation(FeedForward::Network &feedForwardNetwork, std::shared_ptr<CorrectionFunction::CorrectionFunction> correction = std::make_shared<CorrectionFunction::Linear>()):
|
|
BatchPropagation(feedForwardNetwork,correction) {
|
|
}
|
|
|
|
virtual ~QuickPropagation() {
|
|
}
|
|
|
|
void setLearningCoefficient (const float& coefficient) {
|
|
}
|
|
|
|
protected:
|
|
|
|
virtual void updateWeightsAndEndBatch() override;
|
|
|
|
float _maxChange=1.75;
|
|
|
|
virtual inline void resize() override {
|
|
BatchPropagation::resize();
|
|
_lastGradients = _gradients;
|
|
_lastDeltas = _gradients;
|
|
}
|
|
|
|
std::vector<std::vector<std::vector<float>>> _lastDeltas = {};
|
|
std::vector<std::vector<std::vector<float>>> _lastGradients = {};
|
|
};
|
|
}
|
|
} |