taoyang1122/adapt-image-models

Question about the Custom loss function on Recognition (like ViT model)

andrewwang0612 opened this issue · 1 comments

Hello,Thanks for the amazing project!

I would like to ask how to configure the loss function in the training of a recognition model such as ViT. Specifically, I have seen that for tasks like object detection, the loss function is set as "loss_bbox." However, I am unsure of how to set the loss configuration for recognition tasks.

Thanks for helping!

Hi, the loss function really depends on you task. For example, in classification, people usually use cross_entroy loss. And as you mentioned, in object detection, they have both classification and regression losses. You could check different works and follow their settings.