-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get class for given text input? #1
Comments
For example, I printed batch_predictions: [6 6 6 4 6 4 3 6 4 6 3 4 1 2 3 2 3 2 4 0 4 4 4 3 4 6 4 4 1 4 0 6 2 4 4 6 3 3 1 3 4 4 3 4 3 6 3 6 6 6] Hope this will help you find the corresponding labels. |
Thanks for answer, i have done guess myself, and i tested that list of prediction index labels is all_predictions (not batch_predictions). When printed batch_predictions it return empty list [] predict.py from 63 line:
output:
|
Actually, for each batch, there will be a batch_predictions list, which will be appended to all_predictions. Eventually, if you have 100 test examples, all predictions will have 100 numbers. Each number is the corresponding index in labels.json. You can get the actual label by referring to labels.json[index]. |
Thank you! i will create another issue for other question |
Has anyone figured this out? |
@akki2825 Were you able to find a solution for predicting the probability of the classified text ? @GraphGrailAi did you mean that you got accuracy for each class predict or the accuracy of the whole model ? |
Has anyone got a solution on printing the probability of each sentence prediction? |
Could you provide some example code how to get class output for given text input?
I was able to get all code working with ./data/small_samples.json but output is accuracy percent - i need exact class name for every text
The text was updated successfully, but these errors were encountered: