@@ -190,7 +190,7 @@ int writeGDF
190
190
auto && layer_input = first_layer.find (" input" )->second ;
191
191
auto & input_dims = first_layer_dims.find (layer_input)->second ;
192
192
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 ] << " },"
194
194
<< " VX_TYPE_FLOAT32,0" << std::endl;
195
195
ofsGDF << " read " << layer_input << " input.f32" << std::endl;
196
196
@@ -205,7 +205,7 @@ int writeGDF
205
205
// output dims.
206
206
auto & output_dims = in_out_map.find (layer_output)->second ;
207
207
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 ] << " },"
209
209
<< " VX_TYPE_FLOAT32,0" << std::endl;
210
210
211
211
// TODO: Generate dims of layers and create nodes.
@@ -219,7 +219,7 @@ int writeGDF
219
219
220
220
if (layer_details.size () > 4 ) {
221
221
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 ] << " ,"
223
223
<< weight_dims[0 ] << " }," << " VX_TYPE_FLOAT32,0" << std::endl;
224
224
ofsGDF << " init " << layer_weights << " weights/" << layer_weights << " .f32" << std::endl;
225
225
}
@@ -229,12 +229,12 @@ int writeGDF
229
229
layer_bias = layer_details.find (" bias" )->second ;
230
230
auto & bias_dims = in_out_map.find (layer_bias)->second ;
231
231
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;
233
233
ofsGDF << " init " << layer_bias << " weights/" << layer_bias << " .f32" << std::endl;
234
234
}
235
235
else if (layer_details.size () == 5 ) {
236
236
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;
238
238
}
239
239
240
240
// conv params.
@@ -302,7 +302,7 @@ int writeGDF
302
302
303
303
if (layer_details.size () > 4 ) {
304
304
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 ]
306
306
<< " ," << weight_dims[3 ] << " }," << " VX_TYPE_FLOAT32,0" << std::endl;
307
307
ofsGDF << " init " << layer_weights << " weights/" << layer_weights << " .f32" << std::endl;
308
308
}
@@ -312,12 +312,12 @@ int writeGDF
312
312
layer_bias = layer_details.find (" bias" )->second ;
313
313
std::vector<int > bias_dims = in_out_map.find (layer_bias)->second ;
314
314
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;
316
316
ofsGDF << " init " << layer_bias << " weights/" << layer_bias << " .f32" << std::endl;
317
317
}
318
318
else if (layer_details.size () == 5 ) {
319
319
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;
321
321
}
322
322
323
323
ofsGDF << " data " << layer_output << " _params = " << " scalar:VX_TYPE_NN_CONV_PARAMS,{" << pad_w << " ," << pad_h << " ,"
0 commit comments