feat: add TBPTT training with cross-batch hidden state carryover

- config: seq_len=128, batch_size=4 for long-sequence TBPTT
- dataset: create_tbptt_loader with non-overlapping windows, strict temporal order
- model: forward() accepts/exposes hidden state h; add step() for single-frame stateful inference
- train: carry detached hidden state across batches, reset at epoch boundary
- benchmark: fix model call for new (v_body, h) return signature

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-07-29 16:32:41 +08:00
parent 5ccd3df874
commit d1d3310543
7 changed files with 422 additions and 23 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ def evaluate_scene(
tilt = batch["tilt"].to(device)
target = batch["v_body_target"].to(device) # (B, S, 2) normalized
pred = model(events, tilt) # (B, S, 2)
pred, _ = model(events, tilt) # (B, S, 2)
pred = pred[:, -1, :] # (B, 2) — last timestep
target_last = target[:, -1, :] # (B, 2) normalized