Closed nerdimite closed 3 years ago
Maybe @joeddav has an idea!
The pipeline output is sorted from highest to lowest scores, so in your code pred_idx
will always be 0
and pred_cls
will always be "Single Patient"
. Instead you want,
pred_cls = results['labels'][0]
pred_idx = labels.index(pred_cls)
Oh lol, I didn't know it was that simple xD. Thanks @joeddav that increased the accuracy to 73% (though less than online demo) which is good enough. Thank you so much!
Environment info
transformers
version: 4.0.1Who can help
@julien-c @patrickvonplaten
Information
Model I am using (Bert, XLNet ...): facebook/bart-large-mnli
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
While loading the model I get this warning message.
Expected behavior
The results of the online demo and my local code (Colab) are supposed to be the same.