From ffb4a1df67c7ec9ab7d23d35c03bc219fbf00344 Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Sun, 8 Dec 2019 00:26:23 +0300 Subject: [PATCH] Compile fix --- src/activations.h | 1 + src/data.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/activations.h b/src/activations.h index e2a32aa7..127e372f 100644 --- a/src/activations.h +++ b/src/activations.h @@ -24,6 +24,7 @@ void activate_array_swish(float *x, const int n, float * output_sigmoid, float * void activate_array_mish(float *x, const int n, float * activation_input, float * output); void activate_array_normalize_channels(float *x, const int n, int batch, int channels, int wh_step, float *output); void activate_array_normalize_channels_softmax(float *x, const int n, int batch, int channels, int wh_step, float *output); +void gradient_array_normalize_channels_softmax(float *x, const int n, int batch, int channels, int wh_step, float *delta); #ifdef GPU void activate_array_ongpu(float *x, int n, ACTIVATION a); void activate_array_swish_ongpu(float *x, int n, float *output_sigmoid_gpu, float *output_gpu); diff --git a/src/data.c b/src/data.c index d6f162fc..097dae04 100644 --- a/src/data.c +++ b/src/data.c @@ -827,6 +827,7 @@ void blend_truth_mosaic(float *new_truth, int boxes, float *old_truth, int w, in int new_t = count_new_truth; for (t = count_new_truth; t < boxes; ++t) { float *new_truth_ptr = new_truth + new_t*t_size; + new_truth_ptr[0] = 0; float *old_truth_ptr = old_truth + (t - count_new_truth)*t_size; float x = old_truth_ptr[0]; if (!x) break; @@ -1041,7 +1042,7 @@ data load_data_detection(int n, char **paths, int m, int w, int h, int c, int bo if ((min_w_h / 8) < blur && blur > 1) blur = min_w_h / 8; // disable blur if one of the objects is too small image ai = image_data_augmentation(src, w, h, pleft, ptop, swidth, sheight, flip, dhue, dsat, dexp, - blur, boxes, d.y.vals[i]); + blur, boxes, truth); if (use_mixup == 0) { d.X.vals[i] = ai.data;