mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
fix too many or too few labels error for both linux and windows
This commit is contained in:
parent
20bb55c69e
commit
5e1c126bfc
@ -545,7 +545,7 @@ void fill_truth(char *path, char **labels, int k, float *truth)
|
||||
int i;
|
||||
char *filename = "";
|
||||
for (i = strlen(path) - 1; i >= 0; --i) {
|
||||
if (path[i] == '/') {
|
||||
if (path[i] == '/' || path[i] == '\\') {
|
||||
filename = malloc(strlen(path + i) + 1);
|
||||
strcpy(filename, path + i + 1);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user