tensorflow/lite/g3doc/api_docs/python/tflite_model_maker/question_answer.md
page_type: reference description: APIs to train a model that can answer questions based on a predefined text.
<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.question_answer" /> <meta itemprop="path" content="Stable" /> </div>View source on GitHub
APIs to train a model that can answer questions based on a predefined text.
<a href="https://www.tensorflow.org/lite/tutorials/model_maker_question_answer">https://www.tensorflow.org/lite/tutorials/model_maker_question_answer</a>
class BertQaSpec: A specification of BERT model for question answering.
class DataLoader: DataLoader for question answering.
class QuestionAnswer: QuestionAnswer class for inference and exporting to tflite.
MobileBertQaSpec(...): Creates MobileBert model spec for the question answer task. See also: <a href="../tflite_model_maker/question_answer/BertQaSpec"><code>tflite_model_maker.question_answer.BertQaSpec</code></a>.
MobileBertQaSquadSpec(...): Creates MobileBert model spec that's already retrained on SQuAD1.1 for the question answer task. See also: <a href="../tflite_model_maker/question_answer/BertQaSpec"><code>tflite_model_maker.question_answer.BertQaSpec</code></a>.
create(...): Loads data and train the model for question answer.