irfanICMLL / structure_knowledge_distillation

The official code for the paper 'Structured Knowledge Distillation for Semantic Segmentation'. (CVPR 2019 ORAL) and extension to other tasks.
BSD 2-Clause "Simplified" License
695 stars 104 forks source link

pixl-wise distillation loss #11

Closed luhc15 closed 4 years ago

luhc15 commented 4 years ago

Thanks for your excellent work. I wonder in CriterionPixelWise() funciton: N,C,W,H = preds_T[0].shape softmax_pred_T = F.softmax(preds_T[0].view(-1,C), dim=1) Should it be softmax_pred_T = F.softmax(preds_T[0].permute(0,2,3,1).view(-1,C), dim=1)? Thanks

irfanICMLL commented 4 years ago

Thank you for pointing out the mistakes, and we have updated the code~ It should be 'softmax_pred_T = F.softmax(preds_T[0].permute(0,2,3,1).view(-1,C), dim=1)' theoretically, and actually in the old conference version, it does not have this bug.

We will fix this bug and report new results recently.