# Confusion about trainer.predict(dataset\['test'\]) output

**URL:** <https://discuss.huggingface.co/t/confusion-about-trainer-predict-dataset-test-output/25506>\
**Category:** 🤗Transformers\
**Created:** [November 3, 2022, 10:15pm UTC](https://discuss.huggingface.co/t/confusion-about-trainer-predict-dataset-test-output/25506 "2022-11-03T22:15:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SiddharthaM](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/siddhartham/32/12399_2.png) [@SiddharthaM](https://discuss.huggingface.co/u/SiddharthaM)\
**Post date:** [November 3, 2022, 10:15pm UTC](https://discuss.huggingface.co/t/confusion-about-trainer-predict-dataset-test-output/25506/1 "2022-11-03T22:15:13Z")

</div>

Dear everyone,  
Hello, im learning how to fine-tune a Transformer model.  
We predict the outputs of a fine-tuned model using predictions = trainer.predict(dataset[‘test’]). Is predictions.predictions the output logits of the Fine-Tuned Transformer model? or is it something else?

And to calculate the output probabilities of the model, im using the following code

```auto
import tensorflow as tf
predictions = trainer.predict(dataset["test"])
prediction_proba = tf.math.softmax(predictions.predictions, axis=-1)

```

Is it the correct method to find out the prediction probabilities of a model’s output?
