Skip to content

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

Open
@ma-batita

Description

@ma-batita

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions