parity problem set
This commit is contained in:
1 parent
e4f5cdcb00
commit
86def08f41
1 file changed
+45
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace NeuralNetwork {
|
||||
namespace ProblemSets {
|
||||
typedef std::pair<std::vector<float>, std::vector<float>> TrainingPattern;
|
||||
|
||||
std::vector<TrainingPattern> Parity3() {
|
||||
return {
|
||||
{{0,0,0},{0}},
|
||||
{{0,0,1},{1}},
|
||||
{{0,1,0},{1}},
|
||||
{{0,1,1},{0}},
|
||||
{{1,0,0},{1}},
|
||||
{{1,0,1},{0}},
|
||||
{{1,1,0},{0}},
|
||||
{{1,1,1},{1}},
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<TrainingPattern> Parity4() {
|
||||
return {
|
||||
{{0,0,0,0},{0}},
|
||||
{{0,0,0,1},{1}},
|
||||
{{0,0,1,0},{1}},
|
||||
{{0,0,1,1},{0}},
|
||||
{{0,1,0,0},{1}},
|
||||
{{0,1,0,1},{0}},
|
||||
{{0,1,1,0},{0}},
|
||||
{{0,1,1,1},{1}},
|
||||
{{1,0,0,0},{1}},
|
||||
{{1,0,0,1},{0}},
|
||||
{{1,0,1,0},{0}},
|
||||
{{1,0,1,1},{1}},
|
||||
{{1,1,0,0},{0}},
|
||||
{{1,1,0,1},{1}},
|
||||
{{1,1,1,0},{1}},
|
||||
{{1,1,1,1},{0}},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user