parity problem set
This commit is contained in:
45
include/NeuralNetwork/ProblemSets/Parity.h
Normal file
45
include/NeuralNetwork/ProblemSets/Parity.h
Normal file
@@ -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