#37
The neural network module containing the LSTM-based actor and dual critic networks for SAC-v2.
Actor: Linear(state_dim → 256) + ReLU → LSTM(256, 256) → Linear(256 → 128) + ReLU → two heads: μ (4) and log_σ (4, clamped [-5, 2]). Squashed Gaussian policy with reparameterization trick and tanh correction.
Critic (×2): Linear(state_dim + action_dim → 256) + ReLU → LSTM(256, 256) → Linear(256 → 128) + ReLU → Linear(128 → 1).
Hidden size is configurable via SACLSTM_HIDDEN_SIZE env var (default: 256). Weight init: He-style for hidden layers, smaller scale for output.
SACLSTM_HIDDEN_SIZE
Supports deterministic mode (output μ directly, no sampling) via SACLSTM_EVAL_MODE env var.
SACLSTM_EVAL_MODE
test_network.nim
LSTM network module complete — actor + dual critics with proper LSTM cells, squashed Gaussian policy, deterministic mode. 9/9 tests pass.
No dependencies set.
The note is not visible to the blocked user.
Parent
#37
What to build
The neural network module containing the LSTM-based actor and dual critic networks for SAC-v2.
Actor: Linear(state_dim → 256) + ReLU → LSTM(256, 256) → Linear(256 → 128) + ReLU → two heads: μ (4) and log_σ (4, clamped [-5, 2]). Squashed Gaussian policy with reparameterization trick and tanh correction.
Critic (×2): Linear(state_dim + action_dim → 256) + ReLU → LSTM(256, 256) → Linear(256 → 128) + ReLU → Linear(128 → 1).
Hidden size is configurable via
SACLSTM_HIDDEN_SIZEenv var (default: 256). Weight init: He-style for hidden layers, smaller scale for output.Supports deterministic mode (output μ directly, no sampling) via
SACLSTM_EVAL_MODEenv var.Acceptance criteria
test_network.nimpassesBlocked by
LSTM network module complete — actor + dual critics with proper LSTM cells, squashed Gaussian policy, deterministic mode. 9/9 tests pass.