[rnn] Cleanup RNN implementation
authorParichay Kapoor <kparichay@gmail.com>
Thu, 8 Jul 2021 07:26:04 +0000 (16:26 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Thu, 22 Jul 2021 11:47:24 +0000 (20:47 +0900)
commit7015d84c4514cb753d0ff8106fb7fc6b6aaaedb6
treea52e1e5077ca66d247f34779b01587099b49a6d4
parent0fdbb43cc803a3c7989a12dfcd9af1f5a27fe301
[rnn] Cleanup RNN implementation

Cleanup RNN implementation.
Reduce usage of temporary allocated memory and reuse existing memory as much as possible.
Further, request hidden state memory from context than creating by self.

Signed-off-by: Parichay Kapoor <kparichay@gmail.com>
nntrainer/layers/rnn.cpp
nntrainer/layers/rnn.h
test/unittest/layers/unittest_layers_rnn.cpp