chromium/third_party/mediapipe/src/mediapipe/calculators/tensor/feedback_tensors_calculator.proto

// Copyright 2022 The MediaPipe Authors.
//
// 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 mediapipe;

import "mediapipe/framework/calculator.proto";

message FeedbackTensorsCalculatorOptions {
  extend mediapipe.CalculatorOptions {
    optional FeedbackTensorsCalculatorOptions ext = 474496252;
  }

  // Represents the dimensions of a tensor starting from the outermost size.
  message TensorShape {
    repeated int32 dims = 1 [packed = true];
  }

  // The shape of the feedback tensors to add.
  optional TensorShape feedback_tensor_shape = 1;
  // The number of the feedback tensors to add.
  optional int32 num_feedback_tensors = 2 [default = 1];

  enum FeedbackTensorsLocation {
    // The feedback tensors will not be added.
    NONE = 0;
    // The feedback tensors will be added before the input tensors.
    PREPENDED = 1;
    // The feedback tensors will be added after the input tensors.
    APPENDED = 2;
  }

  // Determines the location of the feedback tensor(s) in the output vector.
  optional FeedbackTensorsLocation location = 3 [default = APPENDED];
}