Closed shivanouri closed 3 years ago
I think when the Inferencer is created or loaded the parameter return_class_probs=True
can be used to return all class probabilities, from those you should be able to find out the top 3?
Thanks, problem resolved.
Question I would like to calculate the top-3 accuracy of a text classification task, but as it seems, it's just available for question answering task. Generally, I'd like to have the probability of classes for the predictions.
Additional context My dataset has 140 classes. I use TextClassificationProcessor, TextClassificationHead and AdaptiveModel.
I'd appreciate any hints on how to achieve it.