reffactored and recurrent implementation

This commit is contained in:
2016-01-22 13:21:34 +01:00
parent e61e616227
commit d424d87535
65 changed files with 12102 additions and 2361 deletions

30
tests/recurrent.cpp Normal file
View File

@@ -0,0 +1,30 @@
#include <NeuralNetwork/Recurrent/Network.h>
#include <iostream>
int main() {
NeuralNetwork::Recurrent::Network a(2,1,1);
/* a.getNeurons()[3].setWeight(a.getNeurons()[2],0.00000001565598595);
a.getNeurons()[2].setWeight(a.getNeurons()[3],0.00000001565598595);
a.getNeurons()[3].setWeight(a.getNeurons()[1],0.00000001565598595);
a.getNeurons()[3].setWeight(a.getNeurons()[0],0.00000001565598595);
a.computeOutput({0.5,0});
std::cout << a;
NeuralNetwork::Recurrent::Network b(a.stringify());
*/
a.getNeurons()[3].setWeight(a.getNeurons()[0],0.05);
a.getNeurons()[3].setWeight(a.getNeurons()[1],0.05);
a.getNeurons()[3].setWeight(a.getNeurons()[2],0.7);
a.getNeurons()[2].setWeight(a.getNeurons()[3],0.1);
std::cout << a;
for(int i=0;i<40;i++) {
std::cout << a.computeOutput({1,0.7})[0] << "\n";
}
std::cout << a;
}