loooot of fixes nad SSE enhacement

This commit is contained in:
2014-11-18 11:09:34 +01:00
parent 207e141cca
commit 0abc0d07dd
28 changed files with 246 additions and 280 deletions

View File

@@ -9,13 +9,13 @@ class X: public Shin::NeuronNetwork::Problem
{
public:
X(const X& a) :q(a.q) {}
X(const std::vector<bool> &a):q(a) {}
std::vector<bool> representation() const
X(const std::vector<float> &a):q(a) {}
std::vector<float> representation() const
{
return q;
}
protected:
std::vector<bool> q;
std::vector<float> q;
};
int main()
@@ -24,14 +24,14 @@ int main()
std::vector<X> p;
//
s.push_back(Shin::NeuronNetwork::Solution(std::vector<double>({0})));
p.push_back(X(std::vector<bool>({1,0})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<double>({0})));
p.push_back(X(std::vector<bool>({0,1})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<double>({0})));
p.push_back(X(std::vector<bool>({0,0})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<double>({1})));
p.push_back(X(std::vector<bool>({1,1})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({0})));
p.push_back(X(std::vector<float>({1,0})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({0})));
p.push_back(X(std::vector<float>({0,1})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({0})));
p.push_back(X(std::vector<float>({0,0})));
s.push_back(Shin::NeuronNetwork::Solution(std::vector<float>({1})));
p.push_back(X(std::vector<float>({1,1})));
Shin::NeuronNetwork::FeedForwardNetworkQuick q({2,4,1});
Shin::NeuronNetwork::Learning::BackPropagation b(q);
@@ -45,7 +45,7 @@ int main()
}
b.debugOff();
for(int i=0;i<40;i++)
for(int i=0;i<4000;i++)
{
b.teach(p[i%4],s[i%4]);
}