Keras 3 API 文档 / KerasCV / 损失函数 / SmoothL1Loss 损失函数

SmoothL1Loss 损失函数

[source]

SmoothL1Loss class

keras_cv.losses.SmoothL1Loss(l1_cutoff=1.0, **kwargs)

Implements Smooth L1 loss.

SmoothL1Loss implements the SmoothL1 function, where values less than l1_cutoff contribute to the overall loss based on their squared difference, and values greater than l1_cutoff contribute based on their raw difference.

Arguments

  • l1_cutoff: differences between y_true and y_pred that are larger than l1_cutoff are treated as L1 values