Search code examples
machine-learningtorchconfusion-matrix

Torch Confusion matrix for binary criterion


How do you use the optim packages' confusion matrix with the BCECriterion, which produces binary output? The last layer of my model is nn.logsigmoid.


Solution

  • Confusion matrix cannot accept 0s, it wants the class indices of the target and prediction.