I am using the sigmoid cross entropy loss function for a multilabel classification problem as laid out by this tutorial. However, in both their results on the tutorial and m
In this example the input to the "SigmoidCrossEntropyLoss"
layer is the output of a fully-connect layer. Indeed there are no constraints on the values of the outputs of an "InnerProduct"
layer and they can be in range [-inf, inf]
.
However, if you examine carefully the "SigmoidCrossEntropyLoss"
you'll notice that it includes a "Sigmoid" layer inside -- to ensure stable gradient estimation.
Therefore, at test time, you should replace the "SigmoidCrossEntropyLoss"
with a simple "Sigmoid"
layer to output per-class predictions.