How to train the model with my data?
odek53r opened this issue · comments
Ci Jie commented
I adjust the config file and prepare my training data that has 15 labels in csv format, but when I train the model, I get an error as below.
ValueError: Target size (torch.Size([8, 15])) must be the same as input size (torch.Size([8, 6]))
I try to redo my data and check the generated data many times , but also get this error.
Weitang Liu commented
HI @odek53r, you need to modify line 55-57 in the pybert/io/bert_processor.py
.
def get_labels(self):
"""Gets the list of labels for this data set."""
return ["toxic","severe_toxic","obscene","threat","insult","identity_hate"]
Ci Jie commented
Thank you for prompt reply. It work well now!