Closed jplu closed 5 years ago
Ok, sorry was my bad. After having activated to logs I have seen that I was loading an old checkpoint. Sorrry.
Hi, I am doing the same, and have the same error. Can you explain to me how did you solve this problem?
@jplu Can you tell me the results of your multi-category? Accuracy, recall rate FB1?
Thanks very much! super.single430
Well, on my dataset the accuracy @1
is around 91% and the accuracy @6
is 100%. I did not compute the precision, recall and F1 because there was not point for me to have these scores.
@jplu Thank you very much for your reply,I will try to run your code and hope that I can get good results too.
Thanks very much! super.single430
I use your codes and my own dataset, with three label, label_list = ['p','n','0']. the data set only contain news text and a label with three value listed above. after evaluate, I keep getting this message:
InvalidArgumentError (see above for traceback): assertion failed: [predictions must be in [0, 1]] [Condition x <= y did not hold element-wise:x (f1/remove_squeezable_dimensions/cond/Merge:0) = ] [0 2 0...] [y (f1/Cast_1:0) = ] [1]
[[node f1/assert_less_equal/Assert/Assert (defined at <ipython-input-34-77345aa6cf2c>:30) ]]
but I thought there is one hot encoding step in the create_model function, why I still getting this error? Could anyone help me? Thank you.
Hey @jplu , I am getting a similar error even after appending label to class names.
InvalidArgumentError: assertion failed: [predictions must be in [0, 1]] [Condition x <= y did not hold element-wise:x (loss/Squeeze:0) = ] [0 1 0...] [y (auc/Cast_1:0) = ] [1]
[[node auc/assert_less_equal/Assert/Assert (defined at
Any leads?
@chikubee I got the same error, have you already solved it?
@Roechiiii check your label_list, it should be of the form ['0', '1', '2'] for example, or you can just update the Cola Processor to return this as the label_list if not passed explicitly. Also, make sure your labels are strings in the training data.
@chikubee Thank you very much for your quick reply. I tried to change it, but there is still the error in the evaluation process. I also figured out, that the model based on the offical colab [https://colab.research.google.com/github/google-research/bert/blob/master/predicting_movie_reviews_with_bert_on_tf_hub.ipynb#scrollTo=OsrbTD2EJTVl](Predicting Movie Reviews with BERT on TF Hub.ipynb) a binary classification problem is. When I predict the values with that certain model, I only get two classes back.
@chikubee @Roechiiii Have you found a way to solve this issue? @Roechiiii says changing label_list to ['0','1','2'] is still giving the same error
Hello,
I'm trying to run the jupyter for predicting the IMDB movie reviews, but on a different dataset. Basically the codebase is the same except the part that parse the dataset. My dataset has multiple labels and when I run the jupyter I get the following error:
To reproduce this issue, one can run the following python code:
With a small part of the dataset:
Also if I replace all my labels with
__label__1
and__label__0
it works.I'm certainly doing something wrong but I do not see what. Thanks in advance for any help :)