[layer] Add checks for layer tensor overwrite bug
authorParichay Kapoor <pk.kapoor@samsung.com>
Wed, 6 Oct 2021 07:32:47 +0000 (16:32 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Thu, 7 Oct 2021 04:17:11 +0000 (13:17 +0900)
commitfa831f211cfb2be503104fc11aa0b0fb49f78fba
tree098c031772032a3fe175717a4cfa655a89e4519f
parent672403791f13a3c7ba83a601c1489771b8ba4af9
[layer] Add checks for layer tensor overwrite bug

This patch adds a check to ensure that when layer tensors are created
and overwrites existing tensors. These checks are enabled only in DEBUG
mode to ensure that they only run in CI mode, and are called after each
operation - forwarding, calcGradient, and calcDerivative.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Applications/Custom/pow.cpp
nntrainer/layers/bn_layer.cpp
nntrainer/layers/conv2d_layer.cpp
nntrainer/layers/layer_context.cpp
nntrainer/layers/layer_context.h
nntrainer/layers/layer_node.cpp
nntrainer/tensor/tensor.cpp
test/unittest/unittest_nntrainer_models.cpp