Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math improvements #4

Merged
merged 5 commits into from
Aug 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Tests improvements
  • Loading branch information
nickware44 committed Aug 22, 2023
commit 38b52f06b52ef3fcf04a89b4965aa5b6d7416196
5 changes: 2 additions & 3 deletions samples/test/main.cpp
Original file line number Diff line number Diff line change
@@ -80,11 +80,10 @@ int doTests(const std::string& name, float ref) {
return count;
}


int main() {
constexpr unsigned STRUCTURE_COUNT = 2;
constexpr float SUPERSTRUCTURE_TEST_REFERENCE_OUTPUT = 10.614;
constexpr float BENCHMARK_TEST_REFERENCE_OUTPUT = 1.233;
constexpr float SUPERSTRUCTURE_TEST_REFERENCE_OUTPUT = 0.0291;
constexpr float BENCHMARK_TEST_REFERENCE_OUTPUT = 2.7622;
const unsigned TOTAL_TEST_COUNT = STRUCTURE_COUNT*backends.size();

int count = 0;
4 changes: 2 additions & 2 deletions samples/test/structures/structure_bench.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
{
"type": "cluster",
"position": [600, 600, 0],
"radius": 500,
"radius": 50,
"neurotransmitter": "activation",
"k1": 1050
}
@@ -31,5 +31,5 @@
"output_signals": ["N1"],
"name": "benchmark net",
"desc": "neural net structure for benchmark",
"version": "1.0"
"version": "1.1"
}
24 changes: 12 additions & 12 deletions samples/test/structures/structure_general.json
Original file line number Diff line number Diff line change
@@ -3,16 +3,16 @@
"neurons": [
{
"name": "N1",
"size": 500,
"size": 1000,
"dimensions": 3,
"input_signals": ["E1", "E2"],
"ensemble": "A1",

"synapses": [
{
"type": "cluster",
"position": [250, 250, 0],
"radius": 50,
"position": [500, 500, 0],
"radius": 25,
"neurotransmitter": "activation",
"k1": 10
}
@@ -21,7 +21,7 @@
"receptors": [
{
"type": "cluster",
"position": [250, 250, 0],
"position": [500, 500, 0],
"count": 15,
"radius": 10
}
@@ -38,9 +38,9 @@
{
"type": "cluster",
"position": [100, 100, 0],
"radius": 50,
"radius": 30,
"neurotransmitter": "activation",
"k1": 250
"k1": 30
}
],
"receptors": [
@@ -63,9 +63,9 @@
{
"type": "cluster",
"position": [100, 100, 0],
"radius": 50,
"radius": 30,
"neurotransmitter": "activation",
"k1": 250
"k1": 50
}
],
"receptors": [
@@ -147,27 +147,27 @@
"position": [50, 50, 0],
"radius": 50,
"neurotransmitter": "activation",
"k1": 5000
"k1": 100
}
],
"receptors": [
{
"type": "cluster",
"position": [50, 50, 0],
"count": 15,
"radius": 5
"radius": 30
},
{
"type": "cluster",
"position": [50, 50, 0],
"count": 10,
"radius": 10
"radius": 35
}
]
}
],
"output_signals": ["N6"],
"name": "superstructure test net",
"desc": "neural net structure for general testing",
"version": "1.2"
"version": "1.3"
}
2 changes: 1 addition & 1 deletion samples/vision/main.cpp
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ int main() {
std::ifstream structure(STRUCTURE_PATH);
auto NN = new inn::NeuralNet(STRUCTURE_PATH);
NN -> setStateSyncEnabled();
// NN->doInterlinkInit(4408);
// NN -> doInterlinkInit(4408);

// replicate neurons for classification
for (int i = 2; i <= TEACH_COUNT; i++) NN -> doReplicateEnsemble("A1", "A"+std::to_string(i), true);
2 changes: 1 addition & 1 deletion samples/vision/structures/structure.json
Original file line number Diff line number Diff line change
@@ -37,5 +37,5 @@
"output_signals": ["N1"],
"name": "vision",
"desc": "neural net structure for interference vision sample",
"version": "1.2"
"version": "1.3"
}