• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright 2019 Huawei Technologies Co., Ltd
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19message Checkpoint {
20    message Value {
21        required string tag = 1;
22        oneof value{
23            TensorProto tensor = 2;
24            MapTensorProto maptensor = 3;
25        }
26    }
27    repeated Value value = 1;
28}
29
30
31message TensorProto {
32    // The shape of the tensor.
33    repeated int64 dims = 1;
34    // The type of the tensor.
35    required string tensor_type = 2;
36    // The data of the tensor.
37    required bytes tensor_content = 3;
38}
39
40
41message MapTensorProto {
42    repeated TensorProto tensor = 1;
43}
44