mmrazor
mmrazor copied to clipboard
Update cwd loss
In the semantic segmentation task, even though the teacher model and the student model are trained in the same data set and have the same size of input, their outputs may be different. For example, the output of the student model is 16 times down sampling while the output of the teacher model is 8 times down sampling, which will lead to the loss cannot be calculated properly. We can resize the output of the student model to the output of the teacher model by adding the resize function in MMCV. Note that resize will not work when the output of the student model is the same as the output of the teacher model.