@@ -190,7 +190,7 @@ int writeGDF
190190 auto && layer_input = first_layer.find (" input" )->second ;
191191 auto & input_dims = first_layer_dims.find (layer_input)->second ;
192192 formatFileName (layer_input, " /" , " _" );
193- ofsGDF << " data " << layer_input << " = tensor:4{" << input_dims[3 ] << " ," << input_dims[2 ] << " ," << input_dims[1 ] << " ," << input_dims[0 ] << " },"
193+ ofsGDF << " data " << layer_input << " = tensor:4, {" << input_dims[3 ] << " ," << input_dims[2 ] << " ," << input_dims[1 ] << " ," << input_dims[0 ] << " },"
194194 << " VX_TYPE_FLOAT32,0" << std::endl;
195195 ofsGDF << " read " << layer_input << " input.f32" << std::endl;
196196
@@ -205,7 +205,7 @@ int writeGDF
205205 // output dims.
206206 auto & output_dims = in_out_map.find (layer_output)->second ;
207207 formatFileName (layer_output, " /" , " _" );
208- ofsGDF << " data " << layer_output << " = tensor:4{" << output_dims[3 ] << " ," << output_dims[2 ] << " ," << output_dims[1 ] << " ," << output_dims[0 ] << " },"
208+ ofsGDF << " data " << layer_output << " = tensor:4, {" << output_dims[3 ] << " ," << output_dims[2 ] << " ," << output_dims[1 ] << " ," << output_dims[0 ] << " },"
209209 << " VX_TYPE_FLOAT32,0" << std::endl;
210210
211211 // TODO: Generate dims of layers and create nodes.
@@ -219,7 +219,7 @@ int writeGDF
219219
220220 if (layer_details.size () > 4 ) {
221221 formatFileName (layer_weights, " /" , " _" );
222- ofsGDF << " data " << layer_weights << " = tensor:4{" << weight_dims[3 ] << " ," << weight_dims[2 ] << " ," << weight_dims[1 ] << " ,"
222+ ofsGDF << " data " << layer_weights << " = tensor:4, {" << weight_dims[3 ] << " ," << weight_dims[2 ] << " ," << weight_dims[1 ] << " ,"
223223 << weight_dims[0 ] << " }," << " VX_TYPE_FLOAT32,0" << std::endl;
224224 ofsGDF << " init " << layer_weights << " weights/" << layer_weights << " .f32" << std::endl;
225225 }
@@ -229,12 +229,12 @@ int writeGDF
229229 layer_bias = layer_details.find (" bias" )->second ;
230230 auto & bias_dims = in_out_map.find (layer_bias)->second ;
231231 formatFileName (layer_bias, " /" , " _" );
232- ofsGDF << " data " << layer_bias << " = tensor:1{" << bias_dims[0 ] << " },VX_TYPE_FLOAT32,0" << std::endl;
232+ ofsGDF << " data " << layer_bias << " = tensor:1, {" << bias_dims[0 ] << " },VX_TYPE_FLOAT32,0" << std::endl;
233233 ofsGDF << " init " << layer_bias << " weights/" << layer_bias << " .f32" << std::endl;
234234 }
235235 else if (layer_details.size () == 5 ) {
236236 layer_bias = layer_output + " _b" ;
237- ofsGDF << " data " << layer_bias << " = tensor:1{" << weight_dims[0 ] << " },VX_TYPE_FLOAT32,0" << std::endl;
237+ ofsGDF << " data " << layer_bias << " = tensor:1, {" << weight_dims[0 ] << " },VX_TYPE_FLOAT32,0" << std::endl;
238238 }
239239
240240 // conv params.
@@ -302,7 +302,7 @@ int writeGDF
302302
303303 if (layer_details.size () > 4 ) {
304304 formatFileName (layer_weights, " /" , " _" );
305- ofsGDF << " data " << layer_weights << " =tensor:4{" << weight_dims[0 ] << " ," << weight_dims[1 ] << " ," << weight_dims[2 ]
305+ ofsGDF << " data " << layer_weights << " =tensor:4, {" << weight_dims[0 ] << " ," << weight_dims[1 ] << " ," << weight_dims[2 ]
306306 << " ," << weight_dims[3 ] << " }," << " VX_TYPE_FLOAT32,0" << std::endl;
307307 ofsGDF << " init " << layer_weights << " weights/" << layer_weights << " .f32" << std::endl;
308308 }
@@ -312,12 +312,12 @@ int writeGDF
312312 layer_bias = layer_details.find (" bias" )->second ;
313313 std::vector<int > bias_dims = in_out_map.find (layer_bias)->second ;
314314 formatFileName (layer_bias, " /" , " _" );
315- ofsGDF << " data " << layer_bias << " = tensor:1{" << bias_dims[0 ] << " }, VX_TYPE_FLOAT32,0" << std::endl;
315+ ofsGDF << " data " << layer_bias << " = tensor:1, {" << bias_dims[0 ] << " }, VX_TYPE_FLOAT32,0" << std::endl;
316316 ofsGDF << " init " << layer_bias << " weights/" << layer_bias << " .f32" << std::endl;
317317 }
318318 else if (layer_details.size () == 5 ) {
319319 layer_bias = layer_output + " _b" ;
320- ofsGDF << " data " << layer_bias << " = tensor:1{" << weight_dims[3 ] << " },VX_TYPE_FLOAT32,0" << std::endl;
320+ ofsGDF << " data " << layer_bias << " = tensor:1, {" << weight_dims[3 ] << " },VX_TYPE_FLOAT32,0" << std::endl;
321321 }
322322
323323 ofsGDF << " data " << layer_output << " _params = " << " scalar:VX_TYPE_NN_CONV_PARAMS,{" << pad_w << " ," << pad_h << " ,"
0 commit comments