From 0f342e8f2a1ec95b4e712aa3390b21cf0ea4efae Mon Sep 17 00:00:00 2001 From: Parichay Kapoor Date: Fri, 25 Feb 2022 14:17:10 +0900 Subject: [PATCH] [layer] LSTM weight array size fix this patch adds LSTM weight array size fix. The lstm layer requests 17 tensors to the tensor manager. However, lstm layer only maintains an array of size 15 to store the index of the requested tensors. This leads to an out of range access error. This patch increases the size of the array to store the requested tensors indices from 15 to 17. Signed-off-by: Parichay Kapoor --- nntrainer/layers/lstm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nntrainer/layers/lstm.h b/nntrainer/layers/lstm.h index e68369d..4c600b5 100644 --- a/nntrainer/layers/lstm.h +++ b/nntrainer/layers/lstm.h @@ -115,7 +115,7 @@ private: props::RecurrentActivation, props::ReturnSequences, props::Bidirectional, props::DropOutRate, props::MaxTimestep> lstm_props; - std::array wt_idx; /**< indices of the weights */ + std::array wt_idx; /**< indices of the weights */ /** * @brief activation function for h_t : default is tanh -- 2.7.4