From 72f6de30b2a75fd67436cff4638b8fa36e3fb205 Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Fri, 25 Oct 2019 22:14:27 +0300 Subject: [PATCH] another compile fix --- src/gaussian_yolo_layer.c | 2 +- src/parser.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gaussian_yolo_layer.c b/src/gaussian_yolo_layer.c index 32083401..74604e52 100644 --- a/src/gaussian_yolo_layer.c +++ b/src/gaussian_yolo_layer.c @@ -23,7 +23,7 @@ layer make_gaussian_yolo_layer(int batch, int w, int h, int n, int total, int *mask, int classes) { int i; - layer l = {0}; + layer l = { (LAYER_TYPE)0 }; l.type = GAUSSIAN_YOLO; l.n = n; diff --git a/src/parser.c b/src/parser.c index b31c7673..445771ca 100644 --- a/src/parser.c +++ b/src/parser.c @@ -159,9 +159,15 @@ convolutional_layer parse_convolutional(list *options, size_params params, netwo int n = option_find_int(options, "filters",1); int groups = option_find_int_quiet(options, "groups", 1); int size = option_find_int(options, "size",1); - int stride = option_find_int(options, "stride",1); - int stride_x = option_find_int_quiet(options, "stride_x", stride); - int stride_y = option_find_int_quiet(options, "stride_y", stride); + int stride = -1; + //int stride = option_find_int(options, "stride",1); + int stride_x = option_find_int_quiet(options, "stride_x", -1); + int stride_y = option_find_int_quiet(options, "stride_y", -1); + if (stride_x < 1 || stride_y < 1) { + stride = option_find_int(options, "stride", 1); + if (stride_x < 1) stride_x = stride; + if (stride_y < 1) stride_y = stride; + } int dilation = option_find_int_quiet(options, "dilation", 1); int antialiasing = option_find_int_quiet(options, "antialiasing", 0); if (size == 1) dilation = 1;