神经网络loss

loss function

MSE

  • mean square error,即均方根误差,即

L = 1 N i = 1 N ( y p r e d y t r u e ) 2

MAE

  • mean absolute error,即平均绝对值误差,即

L = 1 N i = 1 N | y p r e d y t r u e |

cross entropy

  • 二分类:以logistic回归为代表

1 N i = 1 N [ y i log p i + ( 1 y i ) l o g ( 1 p i ) ]

  • 多分类:以softmax loss为代表,每个样本的loss为

i = 1 N y i log p i

smooth L1 loss

  • 公式如下:

f ( x ) = { ( σ x ) 2 / 2 , if  x < 1 / σ 2 | x | 0.5 / σ 2 , otherwise

σ 是scaler系数,一般设置为1。这个在bounding box regression loss中常用。

KL散度(kullback_leiber_divergence)

  • 指的是两个概率分布P和Q差别的非对称性的度量。典型情况下,P表示数据的真实分布,Q表示数据的理论分布、模型分布或P的近似分布。
  • 参考链接:https://zhuanlan.zhihu.com/p/28047686

猜你喜欢

转载自blog.csdn.net/u012526003/article/details/81609096