Change loading meta information behavior
authorJihoon Lee <jhoon.it.lee@samsung.com>
Fri, 11 Mar 2022 15:42:54 +0000 (00:42 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 14 Mar 2022 04:10:36 +0000 (13:10 +0900)
commit78d35926337dcc9161216a8f651443f0fa1c24af
tree0d4cf85c02c81ff5b6ae552993571e193ba2b55e
parent1a9f5dd295a489e3fd47f8a1dcf285a0300211d6
Change loading meta information behavior

**Before this PR**

optimizer variable loaded from load_path every time.
Calling model->train(); in a row became unintuitive

1. model->train() load from original load path
thus iteration number roll back to the first one.
2. Same happens for the adam weight
3. model->load(); after model->initialize(); is noop
because loadedWeight becomes true

**After this PR**

1. model load from load_path only at initialize time
2. model->load is not implicitly overriden

**Additional Changes**

1. optimizer weight became part of weights. Now available after initialize()
2. Save format became coherent with load format
3. Some unused variables deleted

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

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
nntrainer/layers/layer_context.cpp
nntrainer/layers/layer_node.cpp
nntrainer/layers/layer_node.h
nntrainer/models/neuralnet.cpp
nntrainer/models/neuralnet.h
nntrainer/tensor/manager.cpp