LSTM network module #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.