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。 返回型別 Tensor