Add post_pos as a model target via travel_dir decomposition
step_length already encodes |post_pos - pre_pos| by definition, so a raw post_pos target would duplicate that magnitude and could drift inconsistent with step_length during sampling. Instead add travel_dir, a unit vector (local frame) giving only the direction of pre_pos->post_pos; post_pos is reconstructed at inference as pre_pos + step_length * travel_dir, keeping the two self-consistent. Target grows from 6D to 9D. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -11,6 +11,9 @@ _TARGET_NAMES = [
|
||||
"post_dx",
|
||||
"post_dy",
|
||||
"post_dz",
|
||||
"travel_dx",
|
||||
"travel_dy",
|
||||
"travel_dz",
|
||||
]
|
||||
|
||||
|
||||
@@ -24,7 +27,7 @@ def validate_marginals(
|
||||
) -> dict[str, np.ndarray]:
|
||||
"""Compare per-dimension marginals of generated vs. real steps.
|
||||
|
||||
Returns {"real": (N,6), "generated": (N,6)} in normalised space.
|
||||
Returns {"real": (N,9), "generated": (N,9)} in normalised space.
|
||||
"""
|
||||
if device is None:
|
||||
device = next(model.parameters()).device
|
||||
|
||||
Reference in New Issue
Block a user