autonomousvision / transfuser

[PAMI'23] TransFuser: Imitation with Transformer-Based Sensor Fusion for Autonomous Driving; [CVPR'21] Multi-Modal Fusion Transformer for End-to-End Autonomous Driving
MIT License
1.17k stars 192 forks source link

Accessing the gradient of the transfuser model in evaluation mode #227

Closed MCUBE-2023 closed 4 months ago

MCUBE-2023 commented 4 months ago

Hi,

Would please tell me which part of the code allows me to access the gradient of the transfuser model in evaluation mode ?

Thank you bunches in advance :)

Kait0 commented 4 months ago

If you mean gradients during deployment, than you need to look at the run_step function. Gradient computation is disabled by default to improve efficiency, you need to remove the inference_mode() and no_grad() decorators.

MCUBE-2023 commented 4 months ago

Thank you so much for your quick reply. Your help allowed me to resolve an issue in which I've been blocked for more than one month. I acknowledge your highly developed professional qualities :)