feat(actpred): log_range 归一化——spk 两列对数尺度修正精度错配
fixed_range 线性 min-max 下常用值挤在低端(10Hz→0.002),闭环反馈 中小绝对误差=大相对误差(模型 C/D 发散根因)。新增 normalize_mode= log_range:spk.F/spk.delay 用 log10(1+x) 对数尺度(10Hz→0.27), 舵机列保持线性。全链路接入(dataset/pretrain/predict/onnx/hailo/ calibration/export),与 v3 审计 none 模式/元数据自动识别合并。
This commit is contained in:
1 parent
fc310c9081
commit
1cf428f384
11 files changed
+306
-66
No files matched your search
@@ -101,11 +101,13 @@ def build_deploy_set(args):
|
||||
history = build_action_history_samples(
|
||||
args.mt_dir, args.samples, cfg.history_len, cfg.action_dim, rng)
|
||||
history = history[:, None, :, :] # (N, 1, H_len, D)
|
||||
if cfg.normalize_actions and cfg.normalize_mode == "fixed_range":
|
||||
# 固定物理范围归一化:校准数据与推理端同一变换(免 stats 文件)
|
||||
from action_norm import normalize_action
|
||||
history = normalize_action(history, cfg.action_dim)
|
||||
print(" action_history: 已 fixed_range 归一化(固定物理范围)")
|
||||
if cfg.normalize_actions and is_range_mode(cfg.normalize_mode):
|
||||
# 固定范围类归一化:校准数据与推理端同一变换(免 stats 文件)
|
||||
from action_norm import normalize_action, is_range_mode
|
||||
history = normalize_action(history, cfg.action_dim,
|
||||
mode=cfg.normalize_mode)
|
||||
print(f" action_history: 已 {cfg.normalize_mode} 归一化"
|
||||
f"(固定物理范围)")
|
||||
elif cfg.normalize_actions:
|
||||
# z-score 归一化模型的 HEF 输入是 z-score 历史(hailo_infer --stats 同语义),
|
||||
# 校准数据必须走同一变换,否则量化范围与推理分布不匹配
|
||||
|
||||
Reference in new issue
Block a user