This commit is contained in:
2014-12-10 20:47:11 +01:00
parent 5d0fa9301b
commit ddef0e37a7
18 changed files with 50 additions and 179 deletions

View File

@@ -37,20 +37,17 @@ int main()
Shin::NeuronNetwork::Learning::BackPropagation b(q);
b.setLearningCoeficient(10);
b.debugOn();
for(int i=0;i<4;i++)
{
b.teach(p[i%4],s[i%4]);
std::cerr << i%4 <<". FOR: [" << p[i%4].representation()[0] << "," <<p[i%4].representation()[1] << "] res: " << q.solve(p[i%4])[0] << " should be " <<
s[i%4][0]<<"\n";
}
b.debugOff();
for(int i=0;i<40000;i++)
{
b.teach(p[i%4],s[i%4]);
}
b.debugOn();
std::cerr << "LEARNED\n";
for(int i=0;i<4;i++)
{