chromium/third_party/tflite_support/src/tensorflow_lite_support/cc/task/text/proto/text_embedder_options.proto

/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

syntax = "proto2";

package tflite.task.text;

import "tensorflow_lite_support/cc/task/core/proto/base_options.proto";
import "tensorflow_lite_support/cc/task/processor/proto/embedding_options.proto";

// Options for setting up a TextEmbedder.
// Next Id: 3
message TextEmbedderOptions {
  // Base options for configuring the external model file.
  optional tflite.task.core.BaseOptions base_options = 1;

  // Options for each embedding head. If the model contains N heads (embedding
  // output tensor), then the len(embedding_options) needs to either
  // 0: All output tensors are processed using the *default* EmbeddingOptions.
  // 1: All output tensors are processed using the *same* EmbeddingOptions.
  // N: Output tensors are processed using the *corresponding* EmbeddingOptions.
  repeated tflite.task.processor.EmbeddingOptions embedding_options = 2;
}