tflite_support.metadata_writers.metadata_info.InputTextTensorMd

A container for the input text tensor metadata information.

Inherits From: TensorMd

name name of the tensor.
description description of what the tensor is.
tokenizer_md information of the tokenizer in the input text tensor, if any. Only RegexTokenizer 1 is currenly supported. If the tokenizer is BertTokenizer 2 or SentencePieceTokenizer 3, refer to bert_nl_classifier.MetadataWriter.

tokenizer_md information of the tokenizer in the input text tensor, if any.

Methods

create_metadata

View source

Creates the input text metadata based on the information.

Returns
A Flatbuffers Python object of the input text metadata.

Raises
ValueError if the type of tokenizer_md is unsupported.