Skip to content

Commit

Permalink
Set/get command for output neurons via UART.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Apr 20, 2024
1 parent 6d51ce0 commit 9f19be3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ func main() {
}
break

case N2CMU_SET_OUTPUT_NEURON:
for i := 0; i < int(network.OutputCount); i++ {
network.OutputNeuron[i] = uart.ReadFloat32()
}

uart.WriteOk()
break

case N2CMU_GET_OUTPUT_NEURON:
for i := 0; i < int(network.OutputCount); i++ {
uart.WriteFloat32(network.OutputNeuron[i])
}
break

case N2CMU_SET_EPOCH_COUNT:
epoch = uart.ReadUint16()
break
Expand Down

0 comments on commit 9f19be3

Please sign in to comment.