Skip to content

bnm_validator

BNMValidator

Bases: SimpleLossValidator

Returns the negative of the BNM loss of all logits.

Source code in pytorch_adapt\validators\bnm_validator.py
 5
 6
 7
 8
 9
10
11
12
13
14
class BNMValidator(SimpleLossValidator):
    """
    Returns the negative of the
    [BNM loss][pytorch_adapt.layers.bnm_loss.BNMLoss]
    of all logits.
    """

    @property
    def loss_fn(self):
        return BNMLoss()