MCZhi / DIPP

[TNNLS] Differentiable Integrated Prediction and Planning Framework for Urban Autonomous Driving
https://mczhi.github.io/DIPP/
197 stars 40 forks source link

Bug in select_future #11

Closed mo-kli closed 1 year ago

mo-kli commented 1 year ago

There might be a bug in select_future https://github.com/MCZhi/DIPP/blob/main/utils/train_utils.py#L68. This function uses the global variable best_mode, which is computed earlier in MFMA_loss using the ground truth. However, select_future is also used by the planner to select plan_init and the predicition mode considered during planning. This looks like cheating, instead scores or the reference path should be used in my opinion by select_future.

MCZhi commented 1 year ago

Thank you for your comment. Actually, this is intentional because in training we can access the ground truth and we assume the scorer gives the correct mode closest to the ground truth, but in testing we take the best mode from the trained scorer instead of "cheating". However, your comment is undoubtedly reasonable and you can modify the code to your idea.