mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Merge branch 'master' of https://github.com/AlexeyAB/darknet
This commit is contained in:
@ -61,12 +61,13 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
|
|||||||
srand(time(0));
|
srand(time(0));
|
||||||
network net = nets[0];
|
network net = nets[0];
|
||||||
|
|
||||||
if ((net.batch * net.subdivisions) == 1) {
|
const int actual_batch_size = net.batch * net.subdivisions;
|
||||||
|
if (actual_batch_size == 1) {
|
||||||
printf("\n Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64 \n");
|
printf("\n Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64 \n");
|
||||||
getchar();
|
getchar();
|
||||||
}
|
}
|
||||||
else if ((net.batch * net.subdivisions) < 64) {
|
else if (actual_batch_size < 64) {
|
||||||
printf("\n Warning: You set batch= lower than 64! It is recommended to set batch=64 subdivision=64 \n");
|
printf("\n Warning: You set batch=%d lower than 64! It is recommended to set batch=64 subdivision=64 \n", actual_batch_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int imgs = net.batch * net.subdivisions * ngpus;
|
int imgs = net.batch * net.subdivisions * ngpus;
|
||||||
@ -1095,7 +1096,7 @@ void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filenam
|
|||||||
fuse_conv_batchnorm(net);
|
fuse_conv_batchnorm(net);
|
||||||
if (net.layers[net.n - 1].classes != names_size) {
|
if (net.layers[net.n - 1].classes != names_size) {
|
||||||
printf(" Error: in the file %s number of names %d that isn't equal to classes=%d in the file %s \n",
|
printf(" Error: in the file %s number of names %d that isn't equal to classes=%d in the file %s \n",
|
||||||
name_list, names_size, net.layers[net.n - 1].classes, datacfg);
|
name_list, names_size, net.layers[net.n - 1].classes, cfgfile);
|
||||||
if(net.layers[net.n - 1].classes > names_size) getchar();
|
if(net.layers[net.n - 1].classes > names_size) getchar();
|
||||||
}
|
}
|
||||||
srand(2222222);
|
srand(2222222);
|
||||||
|
@ -146,6 +146,8 @@ YOLODLL_API void train_detector(char *datacfg, char *cfgfile, char *weightfile,
|
|||||||
YOLODLL_API int network_width(network *net);
|
YOLODLL_API int network_width(network *net);
|
||||||
YOLODLL_API int network_height(network *net);
|
YOLODLL_API int network_height(network *net);
|
||||||
|
|
||||||
|
YOLODLL_API void optimize_picture(network *net, image orig, int max_layer, float scale, float rate, float thresh, int norm);
|
||||||
|
|
||||||
int get_network_nuisance(network net);
|
int get_network_nuisance(network net);
|
||||||
int get_network_background(network net);
|
int get_network_background(network net);
|
||||||
YOLODLL_API void fuse_conv_batchnorm(network net);
|
YOLODLL_API void fuse_conv_batchnorm(network net);
|
||||||
|
Reference in New Issue
Block a user