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 my results, the output predictions are in the range (-Inf, Inf)
, while the range of a sigmoid is [0, 1]
. Is the sigmoid only processed in the backprop? That is, shouldn't a forward pass squash the output?
相关问题
- How to use Reshape keras layer with two None dimen
- How to conditionally scale values in Keras Lambda
- neural network does not learn (loss stays the same
- Trying to understand Pytorch's implementation
- Convolutional Neural Network seems to be randomly
相关文章
- how to flatten input in `nn.Sequential` in Pytorch
- How to downgrade to cuda 10.0 in arch linux?
- How to use cross_val_score with random_state
- Looping through training data in Neural Networks B
- Why does this Keras model require over 6GB of memo
- How to measure overfitting when train and validati
- McNemar's test in Python and comparison of cla
- How to disable keras warnings?
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.