docs(actpred): 模型 B zscore 等权稳定基线文档 + spk 两列固定常量

B 是六模型闭环评估中唯一稳定配置(2445/0.082),固化完整方案作为
部署基线与实验对照基准,并总结归一化系列失败机理(反馈回路需误差
有界且收缩)。配套实现:spk.F/spk.delay 权重归零、推理/反馈固定
常量(bins.FIXED_OUTPUT),拔除闭环发散源,为 B2(zscore+v2)与
F2(onehot+固定)铺路。
This commit is contained in:
qing committed 2026-08-15 02:01:04 +00:00
1 parent 7f21b65428
commit 9000bb4b04
6 files changed
+149 -15

No files matched your search

+10 -2
View File
@@ -10,7 +10,7 @@ from config import parse_checkpoint_config
from imu_norm import normalize_imu
from action_norm import (normalize_action, denormalize_action,
is_range_mode)
from bins import decode as bin_decode
from bins import decode as bin_decode, fixed_zero_columns
from model import ActionPredictor
from utils import parse_action_history
@@ -120,8 +120,16 @@ class ActionPredictorInference:
).unsqueeze(0).to(self._device)
pred = self._model(img_tensor, history, imu_tensor).squeeze(0) # 归一化空间
if self._onehot:
# 多头 logits → 期望值解码 → 原始量纲(箱生活在原始空间)
# 多头 logits → 期望值解码 → 原始量纲(箱生活在原始空间);
# 权重 0 列固定为常量(delay=10ms 等),防闭环垃圾回写
result = bin_decode(pred.cpu().numpy(), self.action_dim)
col_w = self._data_cfg.column_weights
if col_w is None:
from action_norm import default_column_weights
col_w = default_column_weights(self.action_dim)
fixed = fixed_zero_columns(col_w, self.action_dim)
m = fixed != 0.0
result[m] = fixed[m]
if not np.all(np.isfinite(result)):
result = np.nan_to_num(result, nan=0.0, posinf=0.0, neginf=0.0)
return result