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

Module: tflite_model_maker.question_answer

APIs to train a model that can answer questions based on a predefined text.

Task guide:

https://www.tensorflow.org/lite/tutorials/model_maker_question_answer

Classes

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.

Functions

MobileBertQaSpec(...): Creates MobileBert model spec for the question answer task. See also: tflite_model_maker.question_answer.BertQaSpec.

MobileBertQaSquadSpec(...): Creates MobileBert model spec that's already retrained on SQuAD1.1 for the question answer task. See also: tflite_model_maker.question_answer.BertQaSpec.

create(...): Loads data and train the model for question answer.