Hi, thanks for the great work!
I think there may be an off-by-one timing issue at train_eval.py L345:
|
x_his = torch.cat([x_his.reshape(batch_size, num_particles, -1, 3)[:, :, 1:], x[:, :, None].detach()], dim=2) |
Tracing the execution order inside the rollout loop:
L293 x_in = x.clone() # x_in = X_t (snapshot)
L309 pred = material(x, v, x_his) # model sees current = X_t
L310 x, v = sim(...) # x is overwritten in place → X_{t+1}
L345 x_his ← [x_his[:,1:], x[..].detach()] # pushes X_{t+1}, not X_t
So the value appended to the history is X_{t+1} (post-sim), not X_t (pre-sim).
Could you confirm whether the current behavior is intentional, or if pushing x_in is the intended fix?
Thanks!
Hi, thanks for the great work!
I think there may be an off-by-one timing issue at train_eval.py L345:
pgnd/experiments/train/train_eval.py
Line 345 in ae050d1
Tracing the execution order inside the rollout loop:
L293 x_in = x.clone() # x_in = X_t (snapshot)
L309 pred = material(x, v, x_his) # model sees current = X_t
L310 x, v = sim(...) # x is overwritten in place → X_{t+1}
L345 x_his ← [x_his[:,1:], x[..].detach()] # pushes X_{t+1}, not X_t
So the value appended to the history is X_{t+1} (post-sim), not X_t (pre-sim).
Could you confirm whether the current behavior is intentional, or if pushing x_in is the intended fix?
Thanks!