qcraftai / distill-bev

DistillBEV: Boosting Multi-Camera 3D Object Detection with Cross-Modal Knowledge Distillation (ICCV 2023)
81 stars 5 forks source link

Loss backpropagation #10

Closed Li-Whasaka closed 4 months ago

Li-Whasaka commented 4 months ago

Hi, When reading the code, I found bev_feat_list[1](detach)in function extract_img_feat,SO I just want to know, what ‘s the process of backpropagation about distillation?Is it backpropagating from the head to the entire model, or only to the detach part? I see that there is adaptation_cov part in the distillation that is also trained, so it seems that it is also involved in the backpropagation of the entire model

dingwenli commented 4 months ago

I guess you are referring to bev_feat_list[1].detach() in BEVDetSequentialES's extract_img_feat. It's for detaching the gradients of the BEV features of the adjacent frame. For the current frame, it backpropagates gradients from head to the entire model.

Yes. For the adaptation convs, they are also trained with the distillation.