neuralop.losses.data_losses
.PointwiseQuantileLoss
- class neuralop.losses.data_losses.PointwiseQuantileLoss(alpha, reduction='sum')[source]
PointwiseQuantileLoss computes Quantile Loss.
It is used for uncertainty quantification of Neural Operators, as described in [1]_.
- Parameters:
- alphafloat
value, between 0 and 1, of the proportion of points in the output domain expected to fall within predicted quantiles
- reductionstr, optional
- whether to reduce across the batch and channel dimensions
- by summing (‘sum’) or averaging (‘mean’)
- .. warning
PointwiseQuantileLoss always averages over the spatial dimensions. reduction only applies to the batch and channel dimensions.
Methods
__call__
(y_pred, y[, eps])y_pred : torch.tensor
reduce_all
(x)reduce x across the batch according to self.reduction
References
- reduce_all(x)[source]
reduce x across the batch according to self.reduction