Implemented TextCNNs,BERT as well as the weighted vote ensemble method.
- Run entry: src/main/java/EnsembleDemo.java
This repository contains the whole inference process of both BERT and TextCNNs, including preprocessing and prediction.
- Firstly, you must have exported either
BERT/TextCNNsmodels into.pbformat. For BERT models, you can find the solution to exporting BERT.pbmodel by checking https://github.com/cyk1337/BERT-Classification/blob/master/bert/run_classification.py. - Then, use the
.pbmodel path to initialize the model class at , suppose you have generated.pbmodel correctly.