diff --git a/src/classifier.c b/src/classifier.c index 15a76787..07f48f18 100644 --- a/src/classifier.c +++ b/src/classifier.c @@ -753,13 +753,14 @@ void try_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filena float *predictions = network_predict(net, X); layer l = net.layers[layer_num]; - for(int i = 0; i < l.c; ++i){ + int i; + for(i = 0; i < l.c; ++i){ if(l.rolling_mean) printf("%f %f %f\n", l.rolling_mean[i], l.rolling_variance[i], l.scales[i]); } #ifdef GPU cuda_pull_array(l.output_gpu, l.output, l.outputs); #endif - for(int i = 0; i < l.outputs; ++i){ + for(i = 0; i < l.outputs; ++i){ printf("%f\n", l.output[i]); } /* @@ -777,7 +778,7 @@ void try_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filena top_predictions(net, top, indexes); printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time)); - for(int i = 0; i < top; ++i){ + for(i = 0; i < top; ++i){ int index = indexes[i]; printf("%s: %f\n", names[index], predictions[index]); }