Files
lerobot-clone/src
pepijn 936187cd76 fix relative actions: convert before normalization, use global stats
The previous implementation had a double-normalization bug: the
preprocessor normalized actions with absolute stats, then
convert_to_relative subtracted normalized state (wrong), then the
per-timestep normalizer re-normalized.

Now the correct flow is:
1. Convert batch to relative on raw data (before preprocessing)
2. Compute global relative stats (mean/std across all timesteps)
3. Hotswap the preprocessor normalizer to use relative stats
4. Preprocessor normalizes relative values correctly

This brings loss from ~3000+ down to ~0.5, matching the main branch.

Made-with: Cursor
2026-04-01 20:45:35 +00:00
..