Skip to content

mean_weighter

MeanWeighter

Bases: BaseWeighter

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

Source code in pytorch_adapt\weighters\mean_weighter.py
12
13
14
15
16
17
18
class MeanWeighter(BaseWeighter):
    """
    Weights the losses and then returns the **mean** of the weighted losses.
    """

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