[manager] Support deallocation of memory
authorParichay Kapoor <pk.kapoor@samsung.com>
Wed, 3 Mar 2021 10:16:01 +0000 (19:16 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 8 Mar 2021 07:45:43 +0000 (16:45 +0900)
commitb0a9d0677564e2a3d2bc2ab7bce73e7e1d2f76c9
treead769af3f7a3758f8ffdbc530f2c5dd85c80ed0a
parent007ced5d49aaff7ef1c1a44cc0e4aaa268b62e9e
[manager] Support deallocation of memory

Create a proper support for deallocation of memory by the manager which
for now will be done with destruction of manager or the model itself.

This frees all the memory involved in the model for inference or training.

See Also #974

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

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
nntrainer/models/neuralnet.cpp
nntrainer/tensor/manager.cpp
nntrainer/tensor/manager.h
nntrainer/tensor/var_grad.h
nntrainer/tensor/weight.h
test/unittest/unittest_nntrainer_layers.cpp