Have a question? Connect with the community at the TensorFlow Forum Visit Forum

Module: tflite_model_maker.text_classifier

APIs to train a text classification model.

Task guide:



class AverageWordVecSpec: A specification of averaging word vector model.

class BertClassifierSpec: A specification of BERT model for text classification.

class DataLoader: DataLoader for text classifier.

class TextClassifier: TextClassifier class for inference and exporting to tflite.


MobileBertClassifierSpec(...): Creates MobileBert model spec for the text classification task. See also: tflite_model_maker.text_classifier.BertClassifierSpec.

create(...): Loads data and train the model for test classification.