Converting logits to probability
#3
by
ToonWeyens
- opened
How do I get something like a probability?
Running
predicted_label = logits.argmax(-1).item()
predicted_label_name = self.model.config.id2label[predicted_label]
predicted_probability = probabilities[0, predicted_label].item()
I typically get something in the range of 0.001 - 0.002, which is very far from something like 0.5-0.9 that i am expecting for this pre-trained model.