Skip to content

How do you handle your losses different scales #4

Description

@EtienneT

Hi,

Thanks you for the very interesting library! Looking at the code I was wondering how you were balancing the different losses scales. The MSE loss is probably on a completely different scale than the cross-entropy loss. How do you make sure that the MSE loss does not dominate compared to your other losses?

I never actually implemented this myself, but I found two papers that implement custom loss weights. This enables you to have any number of losses each with different scales, but then each gets its own weight for the calculation of the total loss.

The paper in question are section 3 of Multi-Task Learning Using Uncertainty to Weigh Losses and then section 2 of Auxiliary Tasks in Multi-task Learning where some other authors refine the formula a bit more from the first paper.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions