transfuser icon indicating copy to clipboard operation
transfuser copied to clipboard

Accessing the gradient of the transfuser model in evaluation mode

Open MCUBE-2023 opened this issue 1 year ago • 1 comments

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 :)

MCUBE-2023 avatar Jul 03 '24 00:07 MCUBE-2023

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.

Kait0 avatar Jul 03 '24 11:07 Kait0

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 :)

MCUBE-2023 avatar Jul 06 '24 01:07 MCUBE-2023