Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sigmoid Cross-Entropy Loss: ignore selected targets by ignore_label #4986

Merged
merged 2 commits into from
Nov 17, 2016

Conversation

shelhamer
Copy link
Member

@shelhamer shelhamer commented Nov 15, 2016

Sigmoid cross-entropy loss learns to ignore by zeroing out the loss/diff at targets equal to
the configured ignore_label.

Note that sig-ce loss and softmax loss have different defaults for normalization: batch size (sig-ce) and valid (softmax).

TODO: the common normalization and ignore logic should be pulled up into LossLayer, and layers should die loudly by default instead of silently ignoring these options.

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.
@shelhamer shelhamer force-pushed the sigce-ignore branch 4 times, most recently from f4d7208 to 4001295 Compare November 17, 2016 05:29
sig-ce loss handles all the same normalizations as the softmax loss;
refer to BVLC#3296 for more detail.

this preserves the default normalization for sig-ce loss: batch size.
@shelhamer shelhamer merged commit 28c135c into BVLC:master Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant