fixed bug: rand() for batches of images

This commit is contained in:
AlexeyAB
2017-01-10 19:49:38 +03:00
parent b5938098d1
commit b831db5e58
2 changed files with 6 additions and 2 deletions

View File

@ -78,7 +78,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
int count = 0;
//while(i*imgs < N*120){
while(get_current_batch(net) < net.max_batches){
if(l.random && count++%10 == 0){
if(l.random && count++%10 == 0){
printf("Resizing\n");
int dim = (rand() % 10 + 10) * 32;
if (get_current_batch(net)+100 > net.max_batches) dim = 544;