feat(crt-train): add SMOOTHNESS_LAMBDA_RATIO const in heads.rs
This commit is contained in:
@@ -24,6 +24,20 @@ pub const PROJ_DIM: usize = 8;
|
||||
/// HEAD_MID_H define in `cuda/multi_horizon_heads.cu`.
|
||||
pub const HEAD_MID_DIM: usize = 64;
|
||||
|
||||
/// Per-horizon multiplier for the output-smoothness regularizer (CRT.train
|
||||
/// intervention A). λ[h] = `smoothness_base_lambda × SMOOTHNESS_LAMBDA_RATIO[h]`,
|
||||
/// computed at `PerceptionTrainer` construction and uploaded once to the
|
||||
/// device buffer `smoothness_lambda_d`. Ratio scales with horizon length
|
||||
/// to force slow horizons (h6000) to change ~200× more slowly than fast
|
||||
/// ones (h30). See `docs/superpowers/specs/2026-05-20-crt-train-output-smoothness-design.md` §3.1.
|
||||
pub const SMOOTHNESS_LAMBDA_RATIO: [f32; N_HORIZONS] = [
|
||||
1.0, // h30: K_h / K_min = 30 / 30
|
||||
100.0 / 30.0, // h100: ≈ 3.333
|
||||
300.0 / 30.0, // h300: = 10.0
|
||||
1000.0 / 30.0, // h1000: ≈ 33.333
|
||||
6000.0 / 30.0, // h6000: = 200.0
|
||||
];
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct HeadsWeights {
|
||||
pub w: Vec<f32>, // [5, 128] row-major
|
||||
|
||||
Reference in New Issue
Block a user