Returning logits from Trainer.predict()

Hello!

I would like to perform some operations on the output probability distributions of an AutoModelForSequenceClassification model so, I was wondering if it is possible to return the logits rather than predicted class labels from the transformers.Trainer.predict() method.

1 Like

The predict method does return the logits, as well as the labels.

Thank you for the reply, I realized how stupid of a mistake mine was, but I couldn’t delete the post. It surely does return the logits.

No worries, there are no stupid questions :slight_smile:

1 Like