fix(SAC_LSTM_Bot): enforce MaxHidden cap on SACLSTM_HIDDEN_SIZE (review of #48/#49)
This commit is contained in:
@@ -207,6 +207,11 @@ method run(bot: SacBot) =
|
||||
|
||||
# Weight sync (Q7/Q11): always-latest; rebuild this thread's tensors on change.
|
||||
if pullWeights(myVersion, myHidden, flat):
|
||||
if myHidden > MaxHidden:
|
||||
# hArr/cArr are fixed-capacity; a bigger SACLSTM_HIDDEN_SIZE would
|
||||
# heap-overflow them in tensorToHidden. Loud misconfig beats corruption.
|
||||
raise newException(ValueError, "SACLSTM_HIDDEN_SIZE=" & $myHidden &
|
||||
" exceeds MaxHidden=" & $MaxHidden & " (bot-side LSTM persistence cap)")
|
||||
var cur = 0
|
||||
actor = actorFromFlat(flat, cur, myHidden)
|
||||
actorReady = true
|
||||
|
||||
Reference in New Issue
Block a user