Hugging Face Forums
Custom BCEWithLogitsLoss for Sequence Classification using Auto Model
Beginners
John6666
May 26, 2025, 11:10am
2
Hmm…
BCEWithLogitsLoss is for Binary 0 or 1 use torch.nn.CrossEntropyLoss
show post in topic
Related topics
Topic
Replies
Views
Activity
Mismatched target and input size for BCE using "multi_label_classification"
Intermediate
2
7024
September 1, 2022
Logits and labels must have the same shape ((512, 6) vs (6, 1)) - MultiClass Classification with BERT
Beginners
0
1447
September 3, 2021
Mullti Label Text Classification
🤗Transformers
2
1602
June 26, 2023
Finetuning from multiclass to mutlilabel
Intermediate
4
785
September 1, 2021
Target size (torch.Size([8])) must be the same as input size (torch.Size([8, 2]))
🤗Transformers
5
5537
October 13, 2023