【问题标题】:How to use SigmoidCrossEntropyLoss in caffe for binary class classification?如何在咖啡馆中使用 Sigmoid Cross Entropy Loss 进行二元类分类?
【发布时间】:2016-04-24 06:00:08
【问题描述】:

如何在 caffe 中使用 SigmoidCrossEntropyLoss 解决二元类问题? 能给我一个prototxt的例子吗?

【问题讨论】:

    标签: deep-learning caffe matcaffe


    【解决方案1】:

    对于每个训练样本,您需要 label 输入为零或一。除此之外

     layer {
       name: "loss"
       type: "SigmoidCrossEntropyLoss"
       bottom: "predict1d"
       bottom: "label"
       top: "loss"
     }
    

    【讨论】:

    • 我尝试了同样的方法。在此层之前,我有一个输出数量等于 1 的层。我还尝试了“SoftmaxWithLoss”。似乎“SigmoidCrossEntropyLoss”比“SoftmaxWithLoss”慢得多。你知道为什么会这样吗?
    • @user570593 不幸的是,我对这个损失层没有经验
    猜你喜欢
    • 2015-08-29
    • 2012-10-15
    • 2023-03-16
    • 1970-01-01
    • 1970-01-01
    • 2017-02-08
    • 2013-01-09
    • 2018-08-14
    • 2016-07-26
    相关资源
    最近更新 更多