Minor fix

This commit is contained in:
AlexeyAB
2018-06-27 01:54:09 +03:00
parent 24c889d857
commit f88d23ad34
2 changed files with 15 additions and 19 deletions

View File

@ -61,12 +61,13 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
srand(time(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");
getchar();
}
else if ((net.batch * net.subdivisions) < 64) {
printf("\n Warning: You set batch= lower than 64! It is recommended to set batch=64 subdivision=64 \n");
else if (actual_batch_size < 64) {
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;