sigmoid cross-entropy loss: ignore selected targets by `ignore_label`
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Tue, 15 Nov 2016 19:19:37 +0000 (11:19 -0800)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Tue, 15 Nov 2016 19:28:37 +0000 (11:28 -0800)
commitc6ab96596d9eae01c2c403487dc8be8e3edc8fbb
tree7f5d3e3376bcfedd3aebc453f6481703fa8cdeae
parenteb4ba30e3c4899edc7a9713158d61503fa8ecf90
sigmoid cross-entropy loss: ignore selected targets by `ignore_label`

sig-ce learns to ignore by zeroing out the loss/diff at targets equal to
the configured `ignore_label`.

n.b. as of now the loss/diff are not properly normalized when there are
ignored targets. sig-ce loss should adopt the same normalization options
as softmax loss.
include/caffe/layers/sigmoid_cross_entropy_loss_layer.hpp
src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp
src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu
src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp