[ Network Graph ] Temporal Fix in getInputGrad
authorjijoong.moon <jijoong.moon@samsung.com>
Fri, 7 Jan 2022 03:57:47 +0000 (12:57 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 10 Jan 2022 12:43:44 +0000 (21:43 +0900)
commitcf016c64251fc03ee2f24417d9685fe5aa6eb38c
tree81522105d37eec42697ed49f34b5859d0437d34a
parentb29ec245f21b54ca5b35be6f0df296d8d7f0a5e2
[ Network Graph ] Temporal Fix in getInputGrad

When we turn on the inPlaceOptimization, it will fail if we have
mulitiple inputs: input layer ( can be inplace operatation ), normal
layers. Then, we are not allocate the grad between input layer and
this layer and it cause the error during calcDeriviate which requires
the grad tensor of input layer.

This patch fix this temporally by creating tensor buffer it reqruies.

and it includes modification of mem_check script to generate proper
output.

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Applications/utils/mem_usage.sh
nntrainer/layers/layer_context.cpp