vis4d.op.loss.reducer¶
Definitions of loss reducers.
Loss reducers are usually used as the last step in loss computation to average or sum the loss maps from dense predictions or object detections.
Functions
|
Make no change to the loss. |
|
Average the loss tensor values to a single value. |
|
Sum the loss tensor values to a single value. |
Classes
|
A loss reducer to calculated weighted sum loss. |
- class SumWeightedLoss(weight, avg_factor)[source]¶
A loss reducer to calculated weighted sum loss.
Initialize the loss reducer.
- Parameters:
weight (float | Tensor) – Weights for each loss elements
avg_factor (float | Tensor) – average factor for the weighted loss