• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7    http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16syntax = "proto2";
17
18package tflite.evaluation;
19
20import "tensorflow/lite/tools/evaluation/proto/evaluation_stages.proto";
21
22// Next ID: 6
23message EvaluationStageConfig {
24  optional string name = 1;
25
26  // Specification defining what this stage does, and any required parameters.
27  optional ProcessSpecification specification = 2;
28
29  // initializers, inputs and outputs are strings that define colon-separated
30  // mappings between TAGs and their corresponding names.
31  // These names help EvaluationStages communicate with each other during runs.
32  // Format for TAGs: [A-Z0-9_]+ (Uppercase letters, numbers, "_")
33  // Format for names: [a-z0-9_]+ (Lowercase letters, numbers, "_")
34  // Example mapping: "BITMAP1:image_in"
35  // It is up to individual EvaluationStage sub-classes to specify the
36  // initializer/input TAGs they require, and outputs TAGs they provide.
37  // For more information: go/mlperflite-framework#heading=h.fxpk50cps4zs
38  repeated string initializers = 3;
39  repeated string inputs = 4;
40  repeated string outputs = 5;
41}
42
43// Metrics returned from EvaluationStage.LatestMetrics() need not have all
44// fields set.
45message EvaluationStageMetrics {
46  // Total number of times the EvaluationStage is run.
47  // Aka number of calls to EvaluationStage::Run().
48  optional int32 num_runs = 1;
49
50  // Process-specific numbers such as latencies, accuracy, etc.
51  optional ProcessMetrics process_metrics = 2;
52}
53