From 249c2715862ae31b23cea5da1f79549b79304c09 Mon Sep 17 00:00:00 2001 From: Parichay Kapoor Date: Mon, 14 Jun 2021 11:45:16 +0900 Subject: [PATCH] [split layer] Initialize class member bugfix Split layer has class member leading_helper_dim which remains uninitialized and results in bugs when setBatchSize() is called before initialization of the layer. This patch fixes the bug. **Self evaluation:** 1. Build test: [x]Passed [ ]Failed [ ]Skipped 2. Run test: [x]Passed [ ]Failed [ ]Skipped Signed-off-by: Parichay Kapoor --- nntrainer/layers/split_layer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nntrainer/layers/split_layer.h b/nntrainer/layers/split_layer.h index a18d3ad..c1e2fba 100644 --- a/nntrainer/layers/split_layer.h +++ b/nntrainer/layers/split_layer.h @@ -34,7 +34,8 @@ public: template SplitLayer(unsigned int split_dim = 1, Args... args) : Layer(args...), - split_dimension(split_dim) {} + split_dimension(split_dim), + leading_helper_dim(1) {} /** * @brief Destructor of Split Layer -- 2.7.4