From 83d9ad57ba79315dc553dec83652beb7e8d36d61 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Sat, 20 Apr 2024 05:27:17 +0800 Subject: [PATCH] Re-initializing neural network matrices on each set function. --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 6b1ee69..71892f2 100644 --- a/main.go +++ b/main.go @@ -90,6 +90,7 @@ func main() { case N2CMU_SET_INPUT_COUNT: network.InputCount = uart.ReadUint8() + network.InitMatrix() break case N2CMU_GET_INPUT_COUNT: @@ -98,6 +99,7 @@ func main() { case N2CMU_SET_HIDDEN_COUNT: network.HiddenCount = uart.ReadUint8() + network.InitMatrix() break case N2CMU_GET_HIDDEN_COUNT: @@ -106,6 +108,7 @@ func main() { case N2CMU_SET_OUTPUT_COUNT: network.OutputCount = uart.ReadUint8() + network.InitMatrix() break case N2CMU_GET_OUTPUT_COUNT: