# Data format for BertForSequenceClassification with num\_labels \> 2

**URL:** <https://discuss.huggingface.co/t/data-format-for-bertforsequenceclassification-with-num-labels-2/4156>\
**Category:** Beginners\
**Created:** [March 4, 2021, 5:03pm UTC](https://discuss.huggingface.co/t/data-format-for-bertforsequenceclassification-with-num-labels-2/4156 "2021-03-04T17:03:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](https://discuss.huggingface.co/u/lewtun)\
**Post date:** [March 4, 2021, 5:29pm UTC](https://discuss.huggingface.co/t/data-format-for-bertforsequenceclassification-with-num-labels-2/4156/2 "2021-03-04T17:29:12Z")

</div>

Hi @maxpower, I think the format of your dataset is fine but I think you have to change the model’s loss function to use a sigmoid instead of a softmax on the logits (i.e. `BCEWithLogitsLoss`). You can see a skeleton + hacky Colab in this thread: [Fine-Tune for MultiClass or MultiLabel-MultiClass - #8 by lewtun](https://discuss.huggingface.co/t/fine-tune-for-multiclass-or-multilabel-multiclass/4035/8)

---

_[View the full topic](https://discuss.huggingface.co/t/data-format-for-bertforsequenceclassification-with-num-labels-2/4156)._
