torchgeo.losses¶
TorchGeo losses.
- class torchgeo.losses.QRLoss¶
Bases:
torch.nn.Module
The QR (forward) loss between class probabilities and predictions.
This loss is defined in ‘Resolving label uncertainty with implicit generative models’.
New in version 0.2.
- forward(probs, target)[source]¶
Computes the QR (forwards) loss on prior.
- Parameters
probs (torch.Tensor) – probabilities of predictions, expected shape B x C x H x W.
target (torch.Tensor) – prior probabilities, expected shape B x C x H x W.
- Returns
qr loss
- Return type
- class torchgeo.losses.RQLoss¶
Bases:
torch.nn.Module
The RQ (backwards) loss between class probabilities and predictions.
This loss is defined in ‘Resolving label uncertainty with implicit generative models’.
New in version 0.2.
- forward(probs, target)[source]¶
Computes the RQ (backwards) loss on prior.
- Parameters
probs (torch.Tensor) – probabilities of predictions, expected shape B x C x H x W
target (torch.Tensor) – prior probabilities, expected shape B x C x H x W
- Returns
qr loss
- Return type