MSE

Loss variant computing the mean squared error between the model output and the targets. It penalizes large errors quadratically and is a standard objective for regression. Compatible with the regression policy.

Configuration

Selected as name: mse.

Option

Description

Type

Default

reduction

How per-sample losses are reduced.

mean | sum

mean

ignore_nan

Leave out NaN targets, the events a label has no value for, so they add nothing to the loss.

bool

false

With ignore_nan, each head’s mean is taken over the targets kept, and a head with no target in a batch adds nothing rather than NaN. Without it, a NaN target makes the loss NaN.

components:
  loss:
    name: mse
    kwargs: {}