Closed loretoparisi closed 5 years ago
You can try:
predictions = estimator.predict(input_fn=predict_input_fn, yield_single_examples=False)
@miaosenwang Thanks a lot, I will try it.
@loretoparisi did this resolve the problem? I'm having the same issue.
@mjspeck let me have a look again!
@mjspeck @miaosenwang yes it works now! Here is the full working code with the new function for single prediction https://github.com/loretoparisi/bert-movie-reviews-sentiment-classifier
@loretoparisi thank you!
I'm running the notebook "Predicting Movie Reviews with BERT". It works fine, but as soon as I predict one sentence I'm getting this error, I guess on the
tf.estimator.Estimator
inpredictions = estimator.predict(predict_input_fn)
. I'm not sure if the problem is thepredict_input_fn
.my input was
Stacktrace: