Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB committed May 11, 2020
1 parent 0c7305c commit 9cd44ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ int *parse_yolo_mask(char *a, int *num)
int n = 1;
int i;
for (i = 0; i < len; ++i) {
if (a[i] == '#') break;
if (a[i] == ',') ++n;
}
mask = (int*)xcalloc(n, sizeof(int));
Expand Down Expand Up @@ -466,6 +467,7 @@ layer parse_yolo(list *options, size_params params)
int n = 1;
int i;
for (i = 0; i < len; ++i) {
if (a[i] == '#') break;
if (a[i] == ',') ++n;
}
for (i = 0; i < n && i < total*2; ++i) {
Expand All @@ -486,6 +488,7 @@ int *parse_gaussian_yolo_mask(char *a, int *num) // Gaussian_YOLOv3
int n = 1;
int i;
for (i = 0; i < len; ++i) {
if (a[i] == '#') break;
if (a[i] == ',') ++n;
}
mask = (int *)calloc(n, sizeof(int));
Expand Down Expand Up @@ -1154,6 +1157,7 @@ void parse_net_options(list *options, network *net)
int n = 1;
int i;
for (i = 0; i < len; ++i) {
if (l[i] == '#') break;
if (l[i] == ',') ++n;
}
int* steps = (int*)xcalloc(n, sizeof(int));
Expand Down

0 comments on commit 9cd44ee

Please sign in to comment.