modified learning algorithms

This commit is contained in:
2016-02-24 17:30:18 +01:00
parent bf4387a98f
commit 47de0fa08b
8 changed files with 58 additions and 65 deletions

View File

@@ -15,12 +15,12 @@ int main() {
n.randomizeWeights();
NeuralNetwork::Learning::BackPropagation prop;
NeuralNetwork::Learning::BackPropagation prop(n);
for(int i=0;i<100;i++) {
prop.teach(n,{1,0},{1});
prop.teach(n,{1,1},{0});
prop.teach(n,{0,0},{0});
prop.teach(n,{0,1},{1});
prop.teach({1,0},{1});
prop.teach({1,1},{0});
prop.teach({0,0},{0});
prop.teach({0,1},{1});
}
}
}