added Perceptron network
This commit is contained in:
1 parent
3c924d01f3
commit
c130e55f4d
2 files changed
+58
No files matched your search
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
#include <NeuralNetwork/FeedForward/Network.h>
|
||||
#include "CorrectionFunction/Linear.h"
|
||||
|
||||
namespace NeuralNetwork {
|
||||
namespace Learning {
|
||||
|
||||
/** @class BackPropagation
|
||||
* @brief
|
||||
*/
|
||||
class PerceptronLearning {
|
||||
|
||||
public:
|
||||
inline PerceptronLearning(FeedForward::Network &feedForwardNetwork): network(feedForwardNetwork), learningCoefficient(0.4) {
|
||||
}
|
||||
|
||||
virtual ~PerceptronLearning() {
|
||||
}
|
||||
|
||||
PerceptronLearning(const PerceptronLearning&)=delete;
|
||||
PerceptronLearning& operator=(const NeuralNetwork::Learning::PerceptronLearning&) = delete;
|
||||
|
||||
void teach(const std::vector<float> &input, const std::vector<float> &output);
|
||||
|
||||
inline virtual void setLearningCoefficient (const float& coefficient) { learningCoefficient=coefficient; }
|
||||
|
||||
protected:
|
||||
|
||||
FeedForward::Network &network;
|
||||
|
||||
float learningCoefficient;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user