Skip to content

sum_weighter

SumWeighter

Bases: BaseWeighter

Weights the losses and then returns the sum of the weighted losses.

Source code in pytorch_adapt\weighters\sum_weighter.py
 4
 5
 6
 7
 8
 9
10
class SumWeighter(BaseWeighter):
    """
    Weights the losses and then returns the **sum** of the weighted losses.
    """

    def __init__(self, **kwargs):
        super().__init__(reduction=sum, **kwargs)