# Mismatched target and input size for BCE using "multi\_label\_classification"

**URL:** <https://discuss.huggingface.co/t/mismatched-target-and-input-size-for-bce-using-multi-label-classification/8706>\
**Category:** Intermediate\
**Created:** [July 26, 2021, 7:01pm UTC](https://discuss.huggingface.co/t/mismatched-target-and-input-size-for-bce-using-multi-label-classification/8706 "2021-07-26T19:01:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [July 27, 2021, 1:16pm UTC](https://discuss.huggingface.co/t/mismatched-target-and-input-size-for-bce-using-multi-label-classification/8706/2 "2021-07-27T13:16:28Z")

</div>

When defining your `model`, you did not specify the number of labels (with `num_labels=xxx`).

---

_[View the full topic](https://discuss.huggingface.co/t/mismatched-target-and-input-size-for-bce-using-multi-label-classification/8706)._
