google-research / bert

TensorFlow code and pre-trained models for BERT
https://arxiv.org/abs/1810.04805
Apache License 2.0
37.7k stars 9.55k forks source link

how to use bert to classifing text after had fine-tuning #438

Open ztgameming opened 5 years ago

ztgameming commented 5 years ago

I have done the fine-tuning on classifing text and get a good result. now I want to use it to classify text. I write some code about estimator and find it will restore the model each time. I don't get a answer after query some information. Can someone help me? thanks

hsm207 commented 5 years ago

You don't have to write any extra code to make predictions from your fine-tuned model. You just need to run the run_classifier.py script with a different set of arguments. See here for more details

ztgameming commented 5 years ago

@hsm207 I have make predictions done. I want to use it in application. Can you help me?

ztgameming commented 5 years ago

You don't have to write any extra code to make predictions from your fine-tuned model. You just need to run the run_classifier.py script with a different set of arguments. See here for more details

@hsm207 I have make predictions done. I want to use it in application. Can you help me?

hsm207 commented 5 years ago

@ztgameming One way to do it is to use TensorFlow Serving. and pass the text you want to classify using the REST API.