Skip to content

Commit

Permalink
Re-initializing neural network matrices on each set function.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Apr 19, 2024
1 parent b9c8ee6 commit 83d9ad5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func main() {

case N2CMU_SET_INPUT_COUNT:
network.InputCount = uart.ReadUint8()
network.InitMatrix()
break

case N2CMU_GET_INPUT_COUNT:
Expand All @@ -98,6 +99,7 @@ func main() {

case N2CMU_SET_HIDDEN_COUNT:
network.HiddenCount = uart.ReadUint8()
network.InitMatrix()
break

case N2CMU_GET_HIDDEN_COUNT:
Expand All @@ -106,6 +108,7 @@ func main() {

case N2CMU_SET_OUTPUT_COUNT:
network.OutputCount = uart.ReadUint8()
network.InitMatrix()
break

case N2CMU_GET_OUTPUT_COUNT:
Expand Down

0 comments on commit 83d9ad5

Please sign in to comment.