# Trainer predict or evulate does not return softmax or sigmoid value

**URL:** <https://discuss.huggingface.co/t/trainer-predict-or-evulate-does-not-return-softmax-or-sigmoid-value/17799>\
**Category:** 🤗Transformers\
**Created:** [May 11, 2022, 3:54am UTC](https://discuss.huggingface.co/t/trainer-predict-or-evulate-does-not-return-softmax-or-sigmoid-value/17799 "2022-05-11T03:54:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry128](https://avatars.discourse-cdn.com/v4/letter/h/ce7236/32.png) [@Henry128](https://discuss.huggingface.co/u/Henry128)\
**Post date:** [May 11, 2022, 3:54am UTC](https://discuss.huggingface.co/t/trainer-predict-or-evulate-does-not-return-softmax-or-sigmoid-value/17799/1 "2022-05-11T03:54:54Z")

</div>

```auto
class BertPrefixForSequenceClassification(BertPreTrainedModel):
   # method
           return SequenceClassifierOutput(
            loss=loss,
            logits=logits,
            hidden_states=outputs.hidden_states,
            attentions=outputs.attentions,
        )

```

While evaluating/ predicting with Trainer, the return value is not processed by sigmoid or softmax function. Is it necessary to add the sigmoid or softmax function in evaluating and predicting?

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](https://discuss.huggingface.co/u/sgugger)\
**Post date:** [May 11, 2022, 2:18pm UTC](https://discuss.huggingface.co/t/trainer-predict-or-evulate-does-not-return-softmax-or-sigmoid-value/17799/2 "2022-05-11T14:18:57Z")

</div>

If you need it, yes.
