mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Ignore empty extra lines in train.txt
This commit is contained in:
@ -46,10 +46,12 @@ char **get_random_paths(char **paths, int n, int m)
|
|||||||
pthread_mutex_lock(&mutex);
|
pthread_mutex_lock(&mutex);
|
||||||
//printf("n = %d \n", n);
|
//printf("n = %d \n", n);
|
||||||
for(i = 0; i < n; ++i){
|
for(i = 0; i < n; ++i){
|
||||||
|
do {
|
||||||
int index = random_gen() % m;
|
int index = random_gen() % m;
|
||||||
random_paths[i] = paths[index];
|
random_paths[i] = paths[index];
|
||||||
//if(i == 0) printf("%s\n", paths[index]);
|
//if(i == 0) printf("%s\n", paths[index]);
|
||||||
//printf("grp: %s\n", paths[index]);
|
//printf("grp: %s\n", paths[index]);
|
||||||
|
} while (strlen(random_paths[i]) == 0);
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&mutex);
|
pthread_mutex_unlock(&mutex);
|
||||||
return random_paths;
|
return random_paths;
|
||||||
|
Reference in New Issue
Block a user