|
本人最近在做一个用yolov3的模型,进行识别的程序,可咱们的示例代码是用c++编译器编译的,而我目前用的buildroot系统只能用c编译器,以下这个代码编译不通过,希望版主能够帮我解决??
int yolov3_post_process(float* input0, float* input1, float* out_pos, float* out_prop, int* out_label)
{
float(&output0)[1][GRID0][GRID0][SPAN][LISTSIZE] = *((float(*)[1][GRID0][GRID0][SPAN][LISTSIZE])buffer);
float(&output1)[1][GRID1][GRID1][SPAN][LISTSIZE] = *((float(*)[1][GRID1][GRID1][SPAN][LISTSIZE])(buffer +LISTSIZE *SPAN *GRID0 *GRID0));
for (int i = 0; i < SPAN; i++){
for (int j = 0; j < LISTSIZE; j++){
int bias0 = i*LISTSIZE*GRID0*GRID0+ j*GRID0*GRID0;
for (int k = 0; k < GRID0; k++){
int bias_k = bias0 + k*GRID0;
for (int l = 0; l < GRID0; l++){
output0[0][k][l][i][j] = input0[(bias_k+l)];
}
}
int bias1 = i*LISTSIZE*GRID1*GRID1+ j*GRID1*GRID1;
for (int k = 0; k < GRID1; k++){
int bias_k = bias1 + k*GRID1;
for (int l = 0; l < GRID1; l++){
output1[0][k][l][i][j] = input1[bias_k+l];
}
}
}
}
int object_num = process(output0, output1, out_pos, out_prop, out_label);
return object_num;
}
就是float(&output0)[1][,和float(&output1)[1][,因为c语法里面没有引用用法,只能用c++编译器才能够编译通过,而我目前不能使用c++编译器;
|
|