Closed brunopistone closed 3 years ago
If you have an accuracy near 10% on a two-label sequence classification task - does that mean it gets 90% of the results wrong? If so, you might just have switched the labels.
Hi, no the problem is not related to what you said. I tried also to perform one hot encoding on the labels and change the loss function to "categorical_crossentropy" but the results are the same. I tried to use the official pre trained english model (https://github.com/google-research/bert) with another module and I don't have this problem (the keras model is the same).
Hello!
Can you try with TFBertForSequenceClassification
?
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Environment info
transformers
version: 3.5.0Who can help
Information
Model I am using (Bert, XLNet ...): Bert -> bert-base-uncased
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
Hi @LysandreJik , @sgugger , @jplu , I wan running my own script on a custom dataset by using "bert-base-uncased". It's a simple classification task with two classes. Below some examples:
This is the definition of the model:
I've trained the model for 5 epochs, these are results after the last epoch:
Then I save the model in this way:
When I try to perform a prediction also on trained sentences, the model completely fails the goal. I think that is something wrong in the training results, I cannot have an ~81% of accuracy during the training and on validation, but when I validate the model on a completely new dataset I obtain an accuracy near to the 10%.
I decided to build my own model and I compared your framework with another one, that gives optimal results(near to the 85%).
Can you help me to understand the mistakes? Thank you.