
syntax = "proto3";

package dnn;

message Model {
    string name = 1;
    int32 version = 2;
    repeated int32 input_shape = 4;
    repeated string input_name = 7;
    repeated Node node = 10;
    repeated Parameter input = 12;
    repeated Parameter output = 13;
    double a014 = 14;
}

message Parameter {
    string name = 1;
    Shape shape = 2;
}

message Shape {
    int32 dim0 = 1;
    int32 dim1 = 2;
    int32 dim2 = 3;
    int32 dim3 = 4;
}

message Node {
    Layer layer = 1;
    repeated string input = 2;
    repeated string output = 3;
}

message Layer {
    string name = 1;
    string type = 2;
    int32 filters = 3;
    int32 a007 = 7;   // pool
    int32 a008 = 8;   // pool
    int32 groups = 9;
    int32 a010 = 10;  // conv, pool
    int32 a011 = 11;  // pool
    float slope = 14;   // linear
    float intercept = 15;   // linear
    repeated Tensor weight = 50;
    int32 operation = 72;
    int32 axis = 65;  // concat
    int32 a077 = 77;  // conv
    float scale = 79;  // resize
    int32 pad_1 = 80;  // pad
    int32 pad_2 = 81;  // pad
    int32 pad_3 = 82;  // pad
    int32 pad_4 = 83;  // pad
    int32 pad_5 = 84;  // pad
    int32 a085 = 85;  // resize
    int32 a090 = 90;  // pool
    bool is_quantized = 101;
    Buffer quantization = 104;
    int32 stride_w = 109;
    int32 stride_h = 110;
    int32 kernel_w = 111;
    int32 kernel_h = 112;
    int32 a115 = 115; // conv
    int32 a116 = 116; // [conv]
}

message Buffer {
    bytes data = 5;
}

message Tensor {
    int32 dim0 = 1;
    int32 dim1 = 2;
    int32 dim2 = 3;
    int32 dim3 = 4;
    bytes data = 5;
    bytes quantized_data = 6;
}
