Skip to content

Commit

Permalink
Set/get command for hidden bias via UART.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Apr 20, 2024
1 parent 2782df4 commit 56134b2
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 @@ -185,6 +185,20 @@ func main() {
}
break

case N2CMU_SET_HIDDEN_BIAS:
for i := 0; i < int(network.HiddenCount); i++ {
network.HiddenBias[i] = uart.ReadFloat32()
}

uart.WriteOk()
break

case N2CMU_GET_HIDDEN_BIAS:
for i := 0; i < int(network.HiddenCount); i++ {
uart.WriteFloat32(network.HiddenBias[i])
}
break

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

0 comments on commit 56134b2

Please sign in to comment.