blob: 4183c9cf52c4a612d196b2163ec2ed40041bd6e4 [file] [edit]
// Copyright 2023 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.
enum TensorTypes : byte {
FLOAT32 = 0,
FLOAT16 = 1,
INT32 = 2,
UINT8 = 3,
INT64 = 4,
STRING = 5,
BOOL = 6,
INT16 = 7,
COMPLEX64 = 8,
INT8 = 9,
FLOAT64 = 10,
COMPLEX128 = 11,
UINT64 = 12,
// Experimental: Resource and variant types are experimental, that are subject
// to change. Do not implement custom kernels using resource & variant types
// now.
RESOURCE = 13,
VARIANT = 14,
UINT32 = 15,
UINT16 = 16,
INT4 = 17,
BFLOAT16 = 18,
}
table TensorData {
//input_index will be set to -1 for non-input_tensors
input_index:uint;
tensor_index: uint;
shape:[int];
dtype:TensorTypes;
data:[ubyte];
num_bytes:uint;
//layer_number will be set to -1 for input_tensors
layer_number:uint;
}
table SubgraphData {
outputs:[TensorData];
subgraph_index:uint;
}
table ModelTestData {
input_data:[TensorData];
subgraph_data:[SubgraphData];
}
root_type ModelTestData;