
syntax = "proto3";

package protobuf;

message Network {   //Level 0

    message Layer {     //Level 1

        string type = 1;
        string name = 2;
        string input = 3;
        int32 Nn = 4;
        int32 Kx = 5;
        int32 Ky = 6;
        int32 stride = 7;
        int32 padding = 8;
        int32 act_prec = 9; //Precision: sign + mag + frac
        int32 act_mag = 10; //Magnitude
        int32 act_frac = 11; //Frac
        int32 wgt_prec = 12;
        int32 wgt_mag = 13;
        int32 wgt_frac = 14;
        repeated int32 wgt_shape = 15 [packed=true]; //Remove headers
        repeated int32 bias_shape = 16 [packed=true];
        repeated int32 act_shape = 17 [packed=true];
        repeated int32 out_act_shape = 18 [packed=true];

        // Not using Any for performance
        repeated float wgt_data_flt = 19 [packed=true];
        repeated float bias_data_flt = 20 [packed=true];
        repeated float act_data_flt = 21 [packed=true];
        repeated float out_act_data_flt = 22 [packed=true];

        repeated fixed32 wgt_data_fxd = 23 [packed=true];
        repeated fixed32 bias_data_fxd = 24 [packed=true];
        repeated fixed32 act_data_fxd = 25 [packed=true];
        repeated fixed32 out_act_data_fxd = 26 [packed=true];

    }

    string name = 1;
    repeated Layer layers = 2;

}