vis4d.op.loss.base

Base class for meta architectures.

Classes

Loss([reducer])

Base loss class.

class Loss(reducer=<function identity_loss>)[source]

Base loss class.

Initialize a loss functor.

Parameters:
  • reducer (LossReducer) – A function to aggregate the loss values into

  • prediction (a single tensor value. It is commonly used for dense)

  • loss. (tasks to merge pixel-wise loss to a final)

  • Example::

    def mean_loss(loss: torch.Tensor) -> torch.Tensor:

    return loss.mean()