caffe 的损失函数 loss 原文解析-多个损失函数 loss 网络搭建

caffe的原始的loss的英文描述:

http://caffe.berkeleyvision.org/tutorial/loss.html

点击打开链接

由于caffe支持的是有向无环图的网络结构。所以对于多个损失函数的网络结构也是绝对支持的,文中也说明了这一点:

Loss weights

For nets with multiple layers producing a loss (e.g., a network that both classifies the input using a SoftmaxWithLoss layer and reconstructs it using a EuclideanLoss layer), loss weights can be used to specify their relative importance.

此句话说明了这一点。但是此处也详细的说明了:loss_weight 参数的重要性,需要自己不断的实验调参数的。如果参数选取不好,就会导致结果不收敛,参数选取的好就会得到意想不到的结果。

最后也说明了最后输出的是多个损失函数的权重之和。如下:

The final loss in Caffe, then, is computed by summing the total weighted loss over the network, as in the following pseudo-code:

loss := 0
for layer in layers:
  for top, loss_weight in layer.tops, layer.loss_weights:
    loss += loss_weight * sum(top)
最后,再次感叹下:神经网络的神通广大,只要你想的到,哪怕上天入地,它就可以做的到,思维的灵感,神经的灵性!

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值