Shortcuts

MeanSquaredLogError

class torch_uncertainty.metrics.regression.MeanSquaredLogError(squared=True, **kwargs)[source]

MeanSquaredLogError (MSELog) regression metric.

\[\text{MSELog} = \frac{1}{N}\sum_i^N (\log \hat{y_i} - \log y_i)^2\]
where \(y\) is a tensor of target values, and \(\hat{y}\) is a

tensor of predictions.

As input to forward and update the metric accepts the following

input:

  • preds (Tensor): Predictions from model

  • target (Tensor): Ground truth values

As output of forward and compute the metric returns the

following output:

  • mse_log (Tensor): A tensor with the

    relative mean absolute error over the state

Parameters:
  • squared – If True returns MSELog value, if False returns EMSELog value.

  • kwargs – Additional keyword arguments, see Advanced metric settings.

Reference:
As in e.g. From big to small: Multi-scale local planar guidance for

monocular depth estimation

update(pred, target)[source]

Update state with predictions and targets.