mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
improve compatibility with c++ compilers, prepare for CMake
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
#include "connected_layer.h"
|
||||
|
||||
#ifdef OPENCV
|
||||
#include "opencv2/highgui/highgui_c.h"
|
||||
#include <opencv2/highgui/highgui_c.h>
|
||||
#endif
|
||||
|
||||
extern void predict_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int top);
|
||||
@ -258,12 +258,12 @@ layer normalize_layer(layer l, int n)
|
||||
{
|
||||
int j;
|
||||
l.batch_normalize=1;
|
||||
l.scales = calloc(n, sizeof(float));
|
||||
l.scales = (float*)calloc(n, sizeof(float));
|
||||
for(j = 0; j < n; ++j){
|
||||
l.scales[j] = 1;
|
||||
}
|
||||
l.rolling_mean = calloc(n, sizeof(float));
|
||||
l.rolling_variance = calloc(n, sizeof(float));
|
||||
l.rolling_mean = (float*)calloc(n, sizeof(float));
|
||||
l.rolling_variance = (float*)calloc(n, sizeof(float));
|
||||
return l;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user