feat: 目标写法开关 mf_target(mf/lin/sq/mid),默认 mf 且原地路径逐位不变;float32 接线用解析高斯场自证
This commit is contained in:
+2
-1
@@ -161,7 +161,8 @@ def main():
|
||||
l_mf, xh = wta_loss(model, mem, Y); mf_raw = l_mf.detach(); xh = xh.float()
|
||||
else:
|
||||
p_neq = tc['p_neq'] if step >= warm else 0.0
|
||||
l_mf, mf_raw, aux = meanflow_loss(model, mem, Y, p_neq=p_neq, return_aux=True, p_edge=tc.get('p_edge', 0.0))
|
||||
l_mf, mf_raw, aux = meanflow_loss(model, mem, Y, p_neq=p_neq, return_aux=True, p_edge=tc.get('p_edge', 0.0),
|
||||
target=tc.get('mf_target', 'mf'), lam=tc.get('mf_lam', 0.5))
|
||||
sel = ((aux['r'] == aux['t']) & (aux['t'] <= tc.get('fk_tmax', 0.3))).nonzero(as_tuple=True)[0]
|
||||
tt = aux['t'][sel][:, None, None]
|
||||
xh = aux['z'][sel] - tt * aux['u'][sel] # 配对去噪估计(fp32)
|
||||
|
||||
Reference in New Issue
Block a user