BVLC/caffe — pull request #1654 by longjon (2014-12-30 01:33:54+00:00)
Title: Add missing value support to SoftmaxLossLayer

This PR adds an option, `missing_value`, which allows some specified label to indicate that loss should not be computed at the corresponding location.

This creates an issue for normalization. To match the existing normalization, we should normalize by the number of labels actually present. However, this means that the weight of each label depends on the number of missing values in each batch, which may be undesirable. For this reason an extra boolean, `normalize`, is added; if `normalize` is false, normalization occurs only over the batch size.

Ideally this would be done in a way that can be used uniformly across different loss layers, but this is the form it exists in now.

Not yet well tested.