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]¶ 计算 Smooth L1 损失。 如果逐元素绝对误差低于 beta,则函数使用平方项;否则使用 L1 项。 有关详细信息,请参阅 SmoothL1Loss。 返回类型 张量