How to use the fine tuned model for classification (CoLa) task?
How to use the fine-tuned model for classification (CoLa) task?


I do not see the argument `--do_predict`, in `/examples/run_classifier.py`. 

However, `--do_predict` exists in the original implementation of the Bert.

The fine-tuned model is getting saving in the BERT_OUTPUT_DIR as `pytorch_model.bin`, but is there a simple way to reuse it through the command line?
Can you please confirm that the "/examples/run_classifier.py" file is indeed an example for simple sentence classification?
It looks like the code here uses the "BertForSequenceClassification" model where the tf model uses the "BertModel" (line 577 here https://github.com/google-research/bert/blob/master/run_classifier.py) - why is it different?<|||||>> How to use the fine-tuned model for classification (CoLa) task?
> 
> I do not see the argument `--do_predict`, in `/examples/run_classifier.py`.
> 
> However, `--do_predict` exists in the original implementation of the Bert.
> 
> The fine-tuned model is getting saving in the BERT_OUTPUT_DIR as `pytorch_model.bin`, but is there a simple way to reuse it through the command line?

I got an solution of QNLI task in GLUE.  You can add an arg-parser (--do_predict) and [these lines](https://github.com/weidafeng/NLU2019/blob/master/model/run_classifier.py#L743:#L792),  and  run this command: 
```bash
python ./model/run_classifier.py \
	--task_name QNLI \
	--do_predict \
	--do_lower_case \
	--data_dir ./glue_data/QNLI \
	--bert_model bert-base-uncased \
	--output_dir ./glue_data/QNLI/results     **# path to your trained model**
```
You will get the QNLI.tsv file as you want. Hope this works for you.
<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
