Shortcuts

torchgeo.losses

TorchGeo losses.

class torchgeo.losses.QRLoss

Bases: 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 (Tensor) – probabilities of predictions, expected shape B x C x H x W.

  • target (Tensor) – prior probabilities, expected shape B x C x H x W.

Returns

qr loss

Return type

Tensor

class torchgeo.losses.RQLoss

Bases: 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 (Tensor) – probabilities of predictions, expected shape B x C x H x W

  • target (Tensor) – prior probabilities, expected shape B x C x H x W

Returns

qr loss

Return type

Tensor

Read the Docs v: stable
Versions
latest
stable
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.1
v0.1.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources