Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly different kind of labels for the input ( Multi-label Text Classification with BERT and PyTorch Lightning) #15

Open
ma-batita opened this issue Sep 20, 2021 · 0 comments

Comments

@ma-batita
Copy link

Great work you did in the Multi-label Text Classification! Thanks!!
I have a similar problem as you except that II only have one column for the labels (for example, you have [1,0,0,0,0,0] as label of the toxic classe but with my data I have only one value as the number of the class. For example with the first class I have 1 in the column and the number goes to 10). This causes a problem in the training (trainer.fit), the code keep telling me that the target size (torch.Size([16]) which is the epoch number) is different from the input size (which is torch.Size([16, 10]) and the 10 here is the number of the classes) Can you please tell me where can I make the changes so the code will run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant