torch.nn.functional.smooth_l1_loss¶ torch.nn.functional.smooth_l1_loss(input, target, size_average=None, reduce=None, reduction='mean', beta=1.0)[source][source]¶ 计算平滑 L1 损失。 函数在绝对元素级误差低于 beta 时使用平方项,否则使用 L1 项。 详细内容请见 SmoothL1Loss 。 返回类型: 张量