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 when train a classifier for both linux and windows
This commit is contained in:
parent
5e1c126bfc
commit
8ea29e0f3e
@ -546,7 +546,7 @@ void fill_truth(char *path, char **labels, int k, float *truth)
|
|||||||
char *filename = "";
|
char *filename = "";
|
||||||
for (i = strlen(path) - 1; i >= 0; --i) {
|
for (i = strlen(path) - 1; i >= 0; --i) {
|
||||||
if (path[i] == '/' || path[i] == '\\') {
|
if (path[i] == '/' || path[i] == '\\') {
|
||||||
filename = malloc(strlen(path + i) + 1);
|
filename = (char*)malloc(strlen(path + i) + 1);
|
||||||
strcpy(filename, path + i + 1);
|
strcpy(filename, path + i + 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user