lxq1000 / SwinFace

Official Pytorch Implementation of the paper, "SwinFace: A Multi-task Transformer for Face Recognition, Facial Expression Recognition, Age Estimation and Face Attribute Estimation"
MIT License
70 stars 7 forks source link

big diffirence between recognition_loss and analysis_losses #7

Open ericyq opened 7 months ago

ericyq commented 7 months ago

how to handle the loss difference ?

lxq1000 commented 7 months ago

During the training process, there is indeed a significant gap between recognition loss and analysis losses. In our implementation, we set the weight of each loss to 1. Since different tasks are computed in separate subnets, the performance on a certain task is not significantly affected by the scale of the according loss. It is not necessary to rescale the losses of all tasks to the same scale.