tensorflow/lite/g3doc/api_docs/python/tflite_model_maker/text_classifier.md
page_type: reference description: APIs to train a text classification model.
<link rel="stylesheet" href="/site-assets/css/style.css"> <!-- DO NOT EDIT! Automatically generated file. --> <div itemscope itemtype="http://developers.google.com/ReferenceObject"> <meta itemprop="name" content="tflite_model_maker.text_classifier" /> <meta itemprop="path" content="Stable" /> </div>View source on GitHub
APIs to train a text classification model.
<a href="https://www.tensorflow.org/lite/tutorials/model_maker_text_classification">https://www.tensorflow.org/lite/tutorials/model_maker_text_classification</a>
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: <a href="../tflite_model_maker/text_classifier/BertClassifierSpec"><code>tflite_model_maker.text_classifier.BertClassifierSpec</code></a>.
create(...): Loads data and train the model for test classification.